1
0

Compare commits

..

No commits in common. "a268731f19ddf818eae262d703d93c4b9c039c91" and "430a2879e96dcb601765aa80a0ea1d6976188236" have entirely different histories.

35 changed files with 314 additions and 489 deletions

View File

@ -1,35 +1,38 @@
{ {
"catppuccin": { "branch": "main", "commit": "63685e1562ef53873c9764b483d7ac5c7a608922" }, "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"edgy.nvim": { "branch": "main", "commit": "7e8dedc39abebe40c289b8012cc89b11c69aa7a0" }, "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
"gitsigns.nvim": { "branch": "main", "commit": "863903631e676b33e8be2acb17512fdc1b80b4fb" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"conform.nvim": { "branch": "master", "commit": "f3b930db4964d60e255c8f9e37b7f2218dfc08cb" },
"fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" },
"gen.nvim": { "branch": "main", "commit": "bd19cf584b5b82123de977b44105e855e61e5f39" },
"git-worktree.nvim": { "branch": "master", "commit": "f247308e68dab9f1133759b05d944569ad054546" },
"harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" }, "harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" },
"lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" }, "lazy.nvim": { "branch": "main", "commit": "24fa2a97085ca8a7220b5b078916f81e316036fd" },
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" }, "mason-lspconfig": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" },
"noice.nvim": { "branch": "main", "commit": "c1ba80ccf6b3bd8c7fc88fe2e61085131d44ad65" }, "mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" },
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, "nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
"nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" }, "nvim-dap": { "branch": "master", "commit": "abb238f631609ea4be496ba7946f4f3aaec86c6a" },
"nvim-dap-ui": { "branch": "master", "commit": "1c351e4e417d4691da12948b6ecf966936a56d28" }, "nvim-dap-ui": { "branch": "master", "commit": "b7267003ba4dd860350be86f75b9d9ea287cedca" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "3497eb39bf413a57ab5b7e7e2e192683e462148c" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "d7c695ea39542f6da94ee4d66176f5d660ab0a77" },
"nvim-highlight-colors": { "branch": "main", "commit": "a411550ef85cae467b889ba7d1a96bd78332d90e" }, "nvim-emmet": { "branch": "main", "commit": "928cfb74ed436d6d326ccab2061cf3592de1bf55" },
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, "nvim-highlight-colors": { "branch": "main", "commit": "582064092cff170331064b7d198a5b97cb261fca" },
"nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" }, "nvim-jdtls": { "branch": "master", "commit": "10691312d51c5485c656a71258b55d3798d3fb3e" },
"nvim-treesitter": { "branch": "master", "commit": "140f534ce9c02189921b80f5c8a68ab9e3f92ce8" }, "nvim-lspconfig": { "branch": "master", "commit": "38de86f82efd9ba0881203767d6a8e1815abca28" },
"nvim-web-devicons": { "branch": "master", "commit": "1e5a2a796a88b5d696acb07dd5c285b13d13da21" }, "nvim-nio": { "branch": "master", "commit": "632024157d01e8bc48fd7df6a7de8ffe3fdd4f3a" },
"oil.nvim": { "branch": "master", "commit": "1360be5fda9c67338331abfcd80de2afbb395bcd" }, "nvim-treesitter": { "branch": "master", "commit": "ea2b137f35fb1e87a6471ec311805920fdf45745" },
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" }, "nvim-web-devicons": { "branch": "master", "commit": "b77921fdc44833c994fdb389d658ccbce5490c16" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "oil.nvim": { "branch": "master", "commit": "2cb39e838e9dcd8b374f09a3a87a2e5ec9d372f6" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"telescope.nvim": { "branch": "master", "commit": "cb3f98d935842836cc115e8c9e4b38c1380fbb6b" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "telescope.nvim": { "branch": "master", "commit": "2df52609a1632de5d77a0b2416db6ad9cf32e463" },
"trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, "tokyonight.nvim": { "branch": "main", "commit": "0fae425aaab04a5f97666bd431b96f2f19c36935" },
"twilight.nvim": { "branch": "main", "commit": "1584c0b0a979b71fd86b18d302ba84e9aba85b1b" }, "trouble.nvim": { "branch": "main", "commit": "a8264a65a0b894832ea642844f5b7c30112c458f" },
"undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" }, "undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
"vim-be-good": { "branch": "master", "commit": "4fa57b7957715c91326fcead58c1fa898b9b3625" }, "vim-dadbod": { "branch": "master", "commit": "fb30422b7bee7e2fa4205a4d226f01477f4fc593" },
"vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" }, "vim-fugitive": { "branch": "master", "commit": "4f59455d2388e113bd510e85b310d15b9228ca0d" },
"vim-dadbod-completion": { "branch": "master", "commit": "880f7e9f2959e567c718d52550f9fae1aa07aa81" }, "vim-tabby": { "branch": "main", "commit": "afd76df166ed0f223ede1071e0cfde8075cc4a24" }
"vim-dadbod-ui": { "branch": "master", "commit": "f29c85ab42861c6ef683289b0c6a51e0d436dcf6" }, }
"vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" },
"which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" },
"zen-mode.nvim": { "branch": "main", "commit": "29b292bdc58b76a6c8f294c961a8bf92c5a6ebd6" }
}

View File

@ -0,0 +1,36 @@
local dap = require("dap")
print("You opened a Golang file")
dap.adapters.delve = {
type = 'server',
port = '${port}',
executable = {
command = 'dlv',
args = {'dap', '-l', '127.0.0.1:${port}'},
}
}
-- https://github.com/go-delve/delve/blob/master/Documentation/usage/dlv_dap.md
dap.configurations.go = {
{
type = "delve",
name = "Debug",
request = "launch",
program = "${file}"
},
{
type = "delve",
name = "Debug test", -- configuration for debugging test files
request = "launch",
mode = "test",
program = "${file}"
},
-- works with go.mod packages and sub packages
{
type = "delve",
name = "Debug test (go.mod)",
request = "launch",
mode = "test",
program = "./${relativeFileDirname}"
}
}

View File

@ -0,0 +1,24 @@
--[[
-- Only setup for windows
-- Don't know if all this is actually necessary
-- TODO: FIX: Clean this mess up ~ 03/28/2024
--]]
if vim.loop.os_uname().sysname == 'Windows_NT' then
Cmd = 'c:/Users/nigel/Appdata/Local/nvim-data/mason/bin/jdtls.cmd'
JavaDebug = vim.fn.glob("C:/Users/nigel/AppData/Local/nvim-data/java-debug/com.microsoft.java.debug.plugin/target/com.microsoft.java.debug.plugin-0.52.0.jar", 1)
else
Cmd = ''
JavaDebug = nil
end
local config = {
cmd = {Cmd},
root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1]),
init_options = {
bundles = {
JavaDebug
}
}
}
require('jdtls').start_or_attach(config)
require('jdtls').setup_dap({hotcodreplace='auto'})
require('jdtls.dap').setup_dap_main_class_configs()

View File

@ -0,0 +1 @@
print("You opened a LUA file..")

View File

@ -1,5 +1,6 @@
require("barink.vim") require("barink.vim")
require("barink.keys") require("barink.keys")
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ vim.fn.system({

View File

@ -1,16 +1,16 @@
-- Keymaps -- Keymaps
vim.g.mapleader = " " vim.g.mapleader = " "
vim.keymap.set('n', '<leader><F8>', vim.cmd.UndotreeToggle) vim.keymap.set("n", "<leader><F8>", vim.cmd.UndotreeToggle)
vim.keymap.set('n', '<leader>p', [["_dP]]) vim.keymap.set("n", "<leader>p", [["_dP]])
vim.keymap.set('n', '<leader>fa', vim.lsp.buf.format) vim.keymap.set("n", "<leader>fa", vim.lsp.buf.format)
vim.keymap.set('n', '<leader>m', ":Mason<CR>") vim.keymap.set("n", "<leader>m", ":Mason<CR>")
vim.keymap.set('n', '<leader>e',':Explore<CR>', {noremap = false, silent=true}) vim.keymap.set("n", "<leader>e", ":Explore<CR>", { noremap = false, silent = true })
vim.keymap.set('n', '<leader>le',':Lexplore<CR>', {noremap = false, silent=true}) vim.keymap.set("n", "<leader>le", ":Lexplore<CR>", { noremap = false, silent = true })
vim.keymap.set('n', '<leader>l', ':Neotree<CR>', {noremap = false, silent= true}) vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", { silent = true })
-- Move lines while in visual mode -- Move lines while in visual mode
vim.keymap.set('v', '<A-S-j>', ':m \'>+1<CR>gv=gv', {noremap = true}) vim.keymap.set("v", "<A-S-j>", ":m '>+1<CR>gv=gv", { noremap = true })
vim.keymap.set('v', '<A-S-k>', ':m \'<-2<CR>gv=gv', {noremap = true}) vim.keymap.set("v", "<A-S-k>", ":m '<-2<CR>gv=gv", { noremap = true })
-- Move lines while in normal mode -- Move lines while in normal mode
vim.keymap.set("n", "<A-S-j>", ":m .+1<CR>==", { noremap = true }) vim.keymap.set("n", "<A-S-j>", ":m .+1<CR>==", { noremap = true })
@ -21,11 +21,18 @@ vim.keymap.set("i", "<A-j>", ":m .+1<CR>==gi", { noremap = true })
vim.keymap.set("i", "<A-k>", ":m .-2<CR>==gi", { noremap = true }) vim.keymap.set("i", "<A-k>", ":m .-2<CR>==gi", { noremap = true })
-- Diagnostics ! -- Diagnostics !
vim.keymap.set('n', '<C-T>', function() require('trouble').toggle() end ) vim.keymap.set("n", "<C-T>", function()
vim.keymap.set('n', '<leader>d', function () vim.diagnostic.open_float() end ) require("trouble").toggle()
vim.keymap.set('n', '<leader>dn', function () vim.diagnostic.goto_next() end ) end)
vim.keymap.set('n', '<leader>dp', function () vim.diagnostic.goto_prev() end ) vim.keymap.set("n", "<leader>d", function()
vim.keymap.set('n', '<C-d>', function () vim.lsp.buf.code_action() end) vim.diagnostic.open_float()
end)
vim.keymap.set("n", "<leader>dn", function()
vim.diagnostic.goto_next()
end)
vim.keymap.set("n", "<leader>dp", function()
vim.diagnostic.goto_prev()
end)
-- Debugging -- Debugging
vim.keymap.set("n", "<leader>sb", function() vim.keymap.set("n", "<leader>sb", function()

View File

@ -1,14 +0,0 @@
return {
{
"stevearc/oil.nvim",
opt = {
default_file_explorer = false
},
dependencies = {
'nvim-tree/nvim-web-devicons'
},
config = function ()
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc= "Open parent directory"})
end
}
}

View File

@ -0,0 +1,17 @@
return {
{
'David-kunz/gen.nvim',
opts = {
model = "codellama:7b",
host = "localhost",
port = "11434",
quit_mape = "q",
init = function (options) pcall(io.popen("ollama serve > /dev/null 2>&1 &)")) end,
display_mode = "split",
command =function (options)
local body = {model = options.model, stream=true}
return "curl --silent --no-buffer -X POST http://" .. options.host .. ':' .. options.port .. "/api/chat -d $body"
end,
},
}
}

View File

@ -1,9 +1,11 @@
return { return {
'numToStr/Comment.nvim', 'numToStr/Comment.nvim',
lazy = false,
opts = { opts = {
-- add any options here
}, },
config = function() config = function ()
require("Comment").setup() require("Comment").setup()
end end,
lazy = false,
} }

View File

@ -1,35 +1,18 @@
return { return {
"stevearc/conform.nvim", "stevearc/conform.nvim",
event = { "BufWritePre"}, opts = {},
cmd = { "ConformInfo"}, config = function()
opts = { require("conform").setup({
formatters_by_ft = { formatters_by_ft = {
php = { "pint"}, lua = { "stylua" },
lua = { "stylua"}, javascript = { { "prettierd", "prettier" } },
javascript = { "prettierd", "prettier", stop_after_first = true }, },
typescript = { "prettierd", "prettier", stop_after_first = true }, })
}, vim.api.nvim_create_autocmd("BufWritePre", {
format_on_save = { timeout_ms = 500 }, pattern = "*",
default_format_ops = { callback = function(args)
lsp_format = "fallback" require("conform").format({ buffer = args.buf })
}, end,
}, })
config = function () end,
require("conform").setup()
-- Command to run async formatting
vim.api.nvim_create_user_command("Format", function(args)
local range = nil
if args.count ~= -1 then
local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1]
range = {
start = { args.line1, 0 },
["end"] = { args.line2, end_line:len() },
}
end
require("conform").format({ async = true, lsp_format = "fallback", range = range })
end, { range = true })
end
} }

View File

@ -1,16 +0,0 @@
return {
"kristijanhusak/vim-dadbod-ui",
dependencies = {
{'tpope/vim-dadbod', lazy = true },
{ 'kristijanhusak/vim-dadbod-completion', ft = { 'sql', 'mysql', 'plsql'}, lazy = true },
},
cmd = {
'DBUI',
'DBUIToggle',
'DBUIAddConnection',
'DBUIFindBuffer',
},
init = function ()
vim.g.db_ui_use_nerd_fonts = 1
end
}

View File

@ -22,52 +22,13 @@ return {
}, },
config = function () config = function ()
local dap = require('dap') local dap = require('dap')
dap.configurations.cpp = {
{
name = "Launch",
type= "codelldb",
request = "launch",
program = function ()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() , 'file')
end,
cwd = '${workspaceFolder}/Framework',
stopOnEntry = false,
}
}
dap.adapters.lldb = {
type = 'executable',
command = "C:\\Program Files\\LLVM\\bin\\lldb-dap.exe",
name = 'lldb'
}
-- Zig configuration
dap.configurations.zig = {
name = 'launch',
type= 'lldb',
request = 'launch',
program = '${workspaceFolder}/zig-out/bin/tests.exe',
cwd = '${workspaceFolder}',
}
-- Java configuration
-- See also ftplugin
dap.configurations.java = { dap.configurations.java = {
{ {
type = 'java', type = 'java';
request = 'launch', request = 'launch';
name = "Launch file", name = "Launch file";
program = "java ${file}", program = "java ${file}";
}} }}
dap.configurations.cpp = {{
name="launch",
type="lldb",
request="launch",
program = function ()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() ..'/', 'file')
end,
cwd = '${workspaceFolder}',
stopOnEntry = false,
args = {},
}}
dap.configurations.go = { dap.configurations.go = {
{ {
type = "delve", type = "delve",
@ -99,14 +60,6 @@ return {
args = {'dap', '-l', '127.0.0.1:${port}'}, args = {'dap', '-l', '127.0.0.1:${port}'},
} }
} }
dap.adapters.codelldb = {
type= 'server',
port = '${port}',
executable = {
command = 'C:/Users/Nigel/Appdata/Local/nvim-data/mason/bin/codelldb.cmd',
args = {"--port", "${port}"}
}
}
end end
} }
} }

View File

@ -1,29 +0,0 @@
return {
"folke/edgy.nvim",
event = "VeryLazy",
opts= {
bottom ={
{
ft = "toggleterm",
size = { height = 0.4 },
filter = function (_, win)
return vim.api.nvim_win_get_config(win).relative == ""
end,
},
{
ft = "lazyterm",
title = "Lazyterm",
size = { height = 0.4 },
filter = function(buf, _)
return not vim.b[buf].lazyterm_cmd
end
}
},
init = function ()
vim.opt.laststatus = 3
vim.opt.splitkeep = "screen"
end,
}
}

View File

@ -0,0 +1,8 @@
return {
"j-hui/fidget.nvim",
opts = {
notification = {
window = { winblend = 0},
},
},
}

View File

@ -1,14 +1,10 @@
return { return {
{ 'ThePrimeagen/git-worktree.nvim',
'ThePrimeagen/git-worktree.nvim', dependencies = {
dependencies = { 'nvim-telescope/telescope.nvim'
'nvim-telescope/telescope.nvim', },
}, init = function()
opts = {}, require("git-worktree").setup()
init = function () require("telescope").load_extension("git_worktree")
require("git-worktree").setup() end
require("telescope").load_extension("git_worktree")
end
}
} }

View File

@ -1,4 +0,0 @@
return {
'lewis6991/gitsigns.nvim',
opt = {}
}

View File

@ -1,54 +1,56 @@
return return {
{ "neovim/nvim-lspconfig",
'neovim/nvim-lspconfig', dependencies = {
dependencies = { "williamboman/mason-lspconfig",
{ "williamboman/mason.nvim",
"folke/neoconf.nvim", "hrsh7th/cmp-nvim-lsp",
opts = {} "hrsh7th/cmp-buffer",
}, "hrsh7th/cmp-path",
"williamboman/mason-lspconfig", "hrsh7th/cmp-cmdline",
"williamboman/mason.nvim", "hrsh7th/nvim-cmp",
"hrsh7th/cmp-nvim-lsp", {
"hrsh7th/cmp-buffer", "L3MON4D3/LuaSnip",
"hrsh7th/cmp-path", dependencies = "hrsh7th/nvim-cmp",
"hrsh7th/cmp-cmdline", version = "v2.*",
"hrsh7th/nvim-cmp", },
{ { "mfussenegger/nvim-jdtls", dependencies = { "nvim-dap" } },
'L3MON4D3/LuaSnip', {
dependencies = 'hrsh7th/nvim-cmp', "olrtg/nvim-emmet",
version = "v2.*", config = function()
}, vim.keymap.set({ "n", "v" }, "<leader>xe", require("nvim-emmet").wrap_with_abbreviation)
{'mfussenegger/nvim-jdtls', dependencies = {'nvim-dap'}}, end,
}, },
config = function() },
require("mason").setup() config = function()
require("mason-lspconfig").setup({ require("mason").setup()
ensure_installed = { "lua_ls", "bashls", "rust_analyzer" } require("mason-lspconfig").setup({
}) ensure_installed = { "lua_ls", "bashls", "rust_analyzer" },
local cmp = require('cmp') })
cmp.setup({ local cmp = require("cmp")
snippet = { cmp.setup({
expand = function(args) snippet = {
require('luasnip').lsp_expand(args.body) expand = function(args)
end, require("luasnip").lsp_expand(args.body)
}, end,
mapping = cmp.mapping.preset.insert({ },
['<C-b>'] = cmp.mapping.scroll_docs(-4), mapping = cmp.mapping.preset.insert({
['<C-f>'] = cmp.mapping.scroll_docs(4), ["<C-b>"] = cmp.mapping.scroll_docs(-4),
['<C-Space>'] = cmp.mapping.complete(), ["<C-f>"] = cmp.mapping.scroll_docs(4),
['<C-e>'] = cmp.mapping.abort(), ["<C-Space>"] = cmp.mapping.complete(),
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. ["<C-e>"] = cmp.mapping.abort(),
}), ["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
sources = cmp.config.sources({ }),
{ name = 'nvim_lsp', keyword_length = 1 }, sources = cmp.config.sources({
{ name = 'luasnip', option = { show_autosnippets = true}}, { name = "path" },
{ name = 'path' }, { name = "nvim_lsp", keyword_length = 1 },
}, { { name = "luasnip", option = { show_autosnippets = true } },
{ name = 'buffer', keyword_length = 2 }, }, {
}), { name = "buffer", keyword_length = 2 },
window = { }),
documentation = cmp.config.window.bordered() window = {
}, documentation = cmp.config.window.bordered(),
},
})
-- Set configuration for specific filetype. -- Set configuration for specific filetype.
cmp.setup.filetype("gitcommit", { cmp.setup.filetype("gitcommit", {
@ -80,12 +82,7 @@ return
local lsp = require("lspconfig") local lsp = require("lspconfig")
local ls = require("luasnip") lsp.emmet_language_server.setup({})
ls.config.set_config({
history = true,
updateevents = "TextChanged, TextChangedI",
enable_autosnippets = true,
})
lsp.lua_ls.setup({ lsp.lua_ls.setup({
capabilities = require("cmp_nvim_lsp").default_capabilities(), capabilities = require("cmp_nvim_lsp").default_capabilities(),
@ -104,82 +101,51 @@ return
enable_autosnippets = true, enable_autosnippets = true,
}) })
require("luasnip.loaders.from_lua").load({paths= "~/.config/nvim/lua/barink/snippets"}) vim.keymap.set({ "i", "s" }, "<C-K>", function()
ls.expand()
end, { silent = true })
vim.keymap.set({ "i", "s" }, "<C-L>", function()
ls.jump(1)
end, { silent = true })
vim.keymap.set({ "i", "s" }, "<C-J>", function()
ls.jump(-1)
end, { silent = true })
vim.keymap.set({ "i", "s" }, "<C-E>", function()
if ls.choice_active() then
ls.change_choice(1)
end
end, { silent = true })
require("luasnip.loaders.from_lua").load({ paths = "C:\\Users\\nigel\\AppData\\Local\\nvim\\lua\\snippets" })
-- Set up lspconfig. -- Set up lspconfig.
local capabilities = require("cmp_nvim_lsp").default_capabilities() local capabilities = require("cmp_nvim_lsp").default_capabilities()
local lsp = require("lspconfig")
local language_server = { require("lspconfig")["asm_lsp"].setup({
asm_lsp= true, capabilities = capabilities,
zls = true, })
emmet_language_server = true,
rust_analyzer = true,
jdtls = true,
pylsp = true,
phpactor = {
init_options = {
["language_server_phpstan.enabled"] = false,
["language_server_psalm.enabled"] = false,
}
},
clangd = {
capabilities = capabilities,
root_dir = require('lspconfig').util.root_pattern("compile_commands.json", "compile_flags.txt", ".git"),
cmd = {"clangd"},
filetypes = { "c", "cpp", "objc", "objcpp"},
settings = {
clangd = {
compilationDatabasePath = "compile-commands.json",
},
}
},
ts_ls = true,
gopls = true,
intelephense = true,
lua_ls = {
settings = {
Lua = {
diagnostics = {
globals = { 'vim'}
}
}
}
},
}
for name, config in pairs(language_server) do require("lspconfig")["zls"].setup({
if config == true then capabilities = capabilities,
config = {} })
end
config = vim.tbl_deep_extend("force", {}, { capabilities = capabilities }, config)
lsp[name].setup({})
end
vim.api.nvim_create_autocmd("LspAttach", {
callback = function (args)
local client = assert(vim.lsp.get_client_by_id(args.data.client_id), "must have valid client")
local settings = language_server[client.name] require("lspconfig")["rust_analyzer"].setup({
if type(settings) ~= "table" then capabilities = capabilities,
settings = {} })
end
local builtin = require "telescope.builtin" require("lspconfig")["jdtls"].setup({
capabilities = capabilities,
})
vim.opt_local.omnifunc = "v:lua.vim.lsp.omnifunc" require("lspconfig")["bashls"].setup({
vim.keymap.set("n", "gd", builtin.lsp_definitions, {buffer = -1}) capabilities = capabilities,
vim.keymap.set("n", "gr", builtin.lsp_references, {buffer = -1}) })
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, {buffer = -1})
vim.keymap.set("n", "gT", vim.lsp.buf.type_definition, {buffer = -1})
vim.keymap.set("n", "K", vim.lsp.buf.hover, {buffer = -1})
vim.keymap.set("n", "<LEADER>cr", vim.lsp.buf.rename, {buffer =-1}) require("lspconfig")["tsserver"].setup({
vim.keymap.set("n", "<LEADER>ca", vim.lsp.buf.code_action, {buffer = -1}) capabilities = capabilities,
vim.keymap.set("n", "<LEADER>wd", builtin.lsp_document_symbols, {buffer = -1}) })
require("lspconfig")["gopls"].setup({
capabilities = capabilities,
end })
})
end, end,
} }

View File

@ -1,9 +0,0 @@
return {
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim"
},
}

View File

@ -1,11 +0,0 @@
return {
"folke/noice.nvim",
event = "VeryLazy",
opts = {
},
dependencies = {
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
},
}

View File

@ -1,14 +1,14 @@
return { return {
{ 'stevearc/oil.nvim',
"stevearc/oil.nvim", opts = {},
opt = { dependencies = {"nvim-tree/nvim-web-devicons"},
default_file_explorer = false config = function ()
}, require("oil").setup(
dependencies = { {
'nvim-tree/nvim-web-devicons' default_file_explorer=false
}, }
config = function () )
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc= "Open parent directory"}) vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory"})
end
} end
} }

View File

@ -6,7 +6,15 @@ return {
{'nvim-lua/plenary.nvim'}, {'nvim-lua/plenary.nvim'},
{ {
'nvim-telescope/telescope-fzf-native.nvim', 'nvim-telescope/telescope-fzf-native.nvim',
build ="cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build", build = function () if os == 'Windows_NT' then
print("You are on Windows, Idiot!!!")
return [[
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
&& cmake --build build --config Release
&& cmake --install build --prefix build
]] else
return 'make' end
end,
} }
}, },
config = function() config = function()
@ -14,15 +22,8 @@ return {
require('telescope').load_extension('fzf') require('telescope').load_extension('fzf')
local builtin = require('telescope.builtin') local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>fd', builtin.find_files, {}) vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>ft', builtin.git_files, {}) vim.keymap.set('n', '<leader>fs', builtin.git_files, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags)
vim.keymap.set('n', '<leader>fb', builtin.buffers)
vim.keymap.set('n', '<leader>/', builtin.current_buffer_fuzzy_find)
vim.keymap.set('n', '<leader>gw', builtin.grep_string)
vim.keymap.set('n', '<leader>fp',function ()
builtin.find_files { cwd = "~/AppData/Local/nvim/lua/barink/"}
end)
end end
} }
} }

View File

@ -1,30 +0,0 @@
-- return {
-- "folke/tokyonight.nvim",
-- lazy = false,
-- priority = 1000,
-- opts = {},
-- config = function()
-- require("tokyonight").setup({
-- style = "night",
-- light_style = "day",
-- transparent = true,
-- terminal_colors = true,
-- dim_inactive = false,
-- lualine_bold = false,
-- })
--
-- vim.cmd [[colorscheme tokyonight]]
-- end
-- }
return {
{
"catppuccin/nvim",
name="catppuccin",
priority=1000,
config = function ()
require("catppuccin").setup()
vim.cmd.colorscheme('catppuccin')
end
}
}

View File

@ -1,8 +0,0 @@
return {
"folke/todo-comments.nvim",
dependencies = {
"nvim-lua/plenary.nvim"
},
opts = {
}
}

View File

@ -0,0 +1,18 @@
return {
"folke/tokyonight.nvim",
lazy = false,
priority = 1000,
opts = {},
config = function()
require("tokyonight").setup({
style = "night",
light_style = "day",
transparent = true,
terminal_colors = true,
dim_inactive = false,
lualine_bold = false,
})
vim.cmd [[colorscheme tokyonight]]
end
}

View File

@ -1,33 +1,14 @@
return { return {
{
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
build = ":TSUpdate", build = ":TSUpdate",
dependencies = {
{
"nvim-treesitter/playground",
},
},
config = function() config = function()
require 'nvim-treesitter.install'.compilers = {'clang'}
local configs = require("nvim-treesitter.configs") local configs = require("nvim-treesitter.configs")
configs.setup({ configs.setup({
playground = { ensure_installed = { "c", "lua", "vim", "vimdoc", "bash" },
enable = true,
disable = {},
updatetime = 25,
keybindings = {
toggle_query_editor = 'o',
toggle_hl_groups = 'i',
update = 'R',
show_help = '?'
}
},
ensure_installed = { "python", "c", "lua", "vim", "vimdoc", "bash" },
sync_install = false, sync_install = false,
highlight = { enable = true }, highlight = { enable = true },
indent = { enable = true }, indent = { enable = true },
}) })
end end
}, }
}

View File

@ -1,6 +0,0 @@
return {
{
"folke/twilight.nvim",
opts = {}
}
}

View File

@ -1,6 +1 @@
return { return { "mbbill/undotree" }
"mbbill/undotree",
config = function ()
vim.keymap.set('n', '<leader><f1>', vim.cmd.UndotreeToggle)
end
}

View File

@ -1,9 +1,4 @@
return { return {
<<<<<<< HEAD
'tpope/vim-dadbod', 'tpope/vim-dadbod',
} }
=======
"tpope/vim-dadbod",
}
>>>>>>> Windows

View File

@ -1,4 +0,0 @@
return {
'ThePrimeagen/vim-be-good',
}

View File

@ -1,15 +0,0 @@
return {
"folke/which-key.nvim",
event = "VeryLazy",
opts = {
},
keys = {
{
"<leader>?",
function()
require("which-key").show({global = false})
end,
desc = "Buffer Local Keymaps (which-key)",
}
}
}

View File

@ -1,4 +0,0 @@
return {
"folke/zen-mode.nvim",
opts = {}
}

View File

@ -35,15 +35,3 @@ vim.api.nvim_create_autocmd('LspAttach', {
end, end,
}) })
--[[
-- Run zig test on save
-- TODO: fix vim.cmd call
-- TODO: only do this when a zig test file is open
vim.api.nvim_create_autocmd('BufWritePost' , {
callback = function ()
vim.cmd{cmd = '!zig' , args= {'test', vim.fn.expand('%')} }
end
})]]--