diff --git a/lazy-lock.json b/lazy-lock.json index 395169c..f988bdf 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,32 +1,36 @@ { - "LuaSnip": { "branch": "master", "commit": "a7a4b4682c4b3e2ba82b82a4e6e5f5a0e79dec32" }, + "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "fidget.nvim": { "branch": "main", "commit": "933db4596e4bab1b09b6d48a10e21819e4cc458f" }, - "gen.nvim": { "branch": "main", "commit": "87fbe811155b90eea58622614809705b966009ad" }, - "hardtime.nvim": { "branch": "main", "commit": "21b0f9146198bb43fbc9f5ec66c8af3234f278ed" }, - "harpoon": { "branch": "harpoon2", "commit": "a38be6e0dd4c6db66997deab71fc4453ace97f9c" }, - "lazy.nvim": { "branch": "main", "commit": "3132d7d27d56d6bb4bdd0a09623d162b3cf1c588" }, - "lualine.nvim": { "branch": "master", "commit": "b5e8bb642138f787a2c1c5aedc2a78cb2cebbd67" }, - "mason-lspconfig": { "branch": "main", "commit": "9dfcf2036c223920826140f0151d929a43f9eceb" }, - "mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" }, - "nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" }, - "nvim-cmp": { "branch": "main", "commit": "6ed1c93465c33f6a53b4c3f103bf9d1ab696382a" }, - "nvim-dap": { "branch": "master", "commit": "405df1dcc2e395ab5173a9c3d00e03942c023074" }, - "nvim-dap-ui": { "branch": "master", "commit": "edfa93f60b189e5952c016eee262d0685d838450" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "baa5b0dc6663284cce32e0d00ac1f2511b13496f" }, - "nvim-jdtls": { "branch": "master", "commit": "8eb5f0dbe6e126b392ddcaf45893358619893e45" }, - "nvim-lspconfig": { "branch": "master", "commit": "24662f92c18edd397ef12d635b11dbdedef2d094" }, - "nvim-nio": { "branch": "master", "commit": "33c62b3eadd8154169e42144de16ba4db6784bec" }, - "nvim-treesitter": { "branch": "master", "commit": "a951dcb7ec253544b0150251008de8b06a0874cd" }, - "nvim-web-devicons": { "branch": "master", "commit": "3ee60deaa539360518eaab93a6c701fe9f4d82ef" }, - "plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" }, + "edgy.nvim": { "branch": "main", "commit": "0e8bbab4eba9dab6c237e4a2e146dc0466897be6" }, + "fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" }, + "harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" }, + "lazy.nvim": { "branch": "main", "commit": "33be7ac3173c7c20b94ce7e1b9734c1a1e85f292" }, + "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, + "mason-lspconfig": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" }, + "mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" }, + "neoconf.nvim": { "branch": "main", "commit": "04060950124f5901dd383566208b591a5bdb2929" }, + "nui.nvim": { "branch": "main", "commit": "a2bc1e9d0359caa5d11ad967cd1e30e8d4676226" }, + "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, + "nvim-dap": { "branch": "master", "commit": "6f79b822997f2e8a789c6034e147d42bc6706770" }, + "nvim-dap-ui": { "branch": "master", "commit": "b7267003ba4dd860350be86f75b9d9ea287cedca" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "d7c695ea39542f6da94ee4d66176f5d660ab0a77" }, + "nvim-jdtls": { "branch": "master", "commit": "40e8494e04c1bcd5dd6c0d0bc187d2d10965017d" }, + "nvim-lspconfig": { "branch": "master", "commit": "9c9eb07fecc578e25e28db8dc9002b43fff2ed79" }, + "nvim-nio": { "branch": "master", "commit": "7969e0a8ffabdf210edd7978ec954a47a737bbcc" }, + "nvim-treesitter": { "branch": "master", "commit": "09700b88b41ed96391de3d2010d74dc54fd5c210" }, + "nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" }, + "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" }, + "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, - "telescope.nvim": { "branch": "0.1.x", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" }, - "tokyonight.nvim": { "branch": "main", "commit": "fbe3a27378fdd51a8ddd04f57012455436916a62" }, - "trouble.nvim": { "branch": "main", "commit": "b9cf677f20bb2faa2dacfa870b084e568dca9572" }, - "undotree": { "branch": "master", "commit": "aa93a7e5890dbbebbc064cd22260721a6db1a196" }, - "vim-fugitive": { "branch": "master", "commit": "2377e16e6641418565b934990cf49068855987c6" } + "telescope.nvim": { "branch": "master", "commit": "61a4a615366c470a4e9ca8f8b45718b6b92af73f" }, + "todo-comments.nvim": { "branch": "main", "commit": "96fee098a90e7c09c9811aa7df71d773ba8b9b53" }, + "tokyonight.nvim": { "branch": "main", "commit": "30d7be361a7fbf187a881f17e574e9213d5108ea" }, + "trouble.nvim": { "branch": "main", "commit": "88c3be40c061ce053ab326ce4fdcb973a1f785ff" }, + "undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" }, + "vim-fugitive": { "branch": "master", "commit": "64d6cafb9dcbacce18c26d7daf617ebb96b273f3" }, + "which-key.nvim": { "branch": "main", "commit": "7915964e73c30ba5657e9a762c6570925dad421b" } } \ No newline at end of file diff --git a/lua/barink/after/ftplugin/java.lua b/lua/barink/after/ftplugin/java.lua index 3af7acd..4b73cc1 100644 --- a/lua/barink/after/ftplugin/java.lua +++ b/lua/barink/after/ftplugin/java.lua @@ -1,15 +1,5 @@ ---[[ --- 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 +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) local config = { cmd = {Cmd}, root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1]), diff --git a/lua/barink/keys.lua b/lua/barink/keys.lua index 930d945..d2ba03f 100644 --- a/lua/barink/keys.lua +++ b/lua/barink/keys.lua @@ -7,13 +7,7 @@ vim.keymap.set('n', 'fa', vim.lsp.buf.format) vim.keymap.set('n', 'm', ":Mason") vim.keymap.set('n', 'e',':Explore', {noremap = false, silent=true}) vim.keymap.set('n', 'le',':Lexplore', {noremap = false, silent=true}) -local osname = vim.loop.os_uname().sysname -if osname == "Windows_NT" then - vim.keymap.set('n', 'x', function() print("sorry this is windows!") end) -elseif osname == "Linux" then - -- Linux only!! - vim.keymap.set('n', 'x', "!chmod +x %", { silent = true }) -end +vim.keymap.set('n', 'l', ':Neotree', {noremap = false, silent= true}) -- Move lines while in visual mode vim.keymap.set('v', '', ':m \'>+1gv=gv', {noremap = true}) vim.keymap.set('v', '', ':m \'<-2gv=gv', {noremap = true}) @@ -31,7 +25,7 @@ vim.keymap.set('n', '', function() require('trouble').toggle() end ) vim.keymap.set('n', 'd', function () vim.diagnostic.open_float() end ) vim.keymap.set('n', 'dn', function () vim.diagnostic.goto_next() end ) vim.keymap.set('n', 'dp', function () vim.diagnostic.goto_prev() end ) - +vim.keymap.set('n', '', function () vim.lsp.buf.code_action() end) -- Debugging vim.keymap.set('n', 'sb', function () require('dap').toggle_breakpoint() end ) vim.keymap.set('n', 'db', function () require('dapui').toggle() end ) diff --git a/lua/barink/plugins/codellama.lua b/lua/barink/plugins/codellama.lua deleted file mode 100644 index e4987cd..0000000 --- a/lua/barink/plugins/codellama.lua +++ /dev/null @@ -1,17 +0,0 @@ -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, - }, - } -} diff --git a/lua/barink/plugins/dap.lua b/lua/barink/plugins/dap.lua index a7ddf18..ccd4d5b 100644 --- a/lua/barink/plugins/dap.lua +++ b/lua/barink/plugins/dap.lua @@ -22,6 +22,18 @@ return { }, config = function () 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.configurations.java = { { type = 'java'; @@ -60,6 +72,14 @@ return { 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 } } diff --git a/lua/barink/plugins/edgy.lua b/lua/barink/plugins/edgy.lua new file mode 100644 index 0000000..dc0e6c7 --- /dev/null +++ b/lua/barink/plugins/edgy.lua @@ -0,0 +1,9 @@ +return { + "folke/edgy.nvim", + event = "VeryLazy", + opts = {}, + init = function () + vim.opt.laststatus = 3 + vim.opt.splitkeep = "screen" + end +} diff --git a/lua/barink/plugins/hardtime.lua b/lua/barink/plugins/hardtime.lua deleted file mode 100644 index dc39d23..0000000 --- a/lua/barink/plugins/hardtime.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - { - 'm4xshen/hardtime.nvim', - dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim"}, - opts = { - restriction_mode = "hint" - } - } -} diff --git a/lua/barink/plugins/lsp.lua b/lua/barink/plugins/lsp.lua index 162cf42..6fcdfe0 100644 --- a/lua/barink/plugins/lsp.lua +++ b/lua/barink/plugins/lsp.lua @@ -2,6 +2,10 @@ return { 'neovim/nvim-lspconfig', dependencies = { + { + "folke/neoconf.nvim", + opts = {} + }, "williamboman/mason-lspconfig", "williamboman/mason.nvim", "hrsh7th/cmp-nvim-lsp", @@ -111,6 +115,26 @@ return require('lspconfig')['asm_lsp'].setup({ capabilities = capabilities }) + local root_files = { + 'premake5.lua', + '.clang-tidy', + '.clang-format', + 'compile_commands', + 'compile_commands.json', + 'compile_flags.txt', + 'configure.ac', + '.git' + } + local util = require('lspconfig.util') + require('lspconfig')['clangd'].setup({ + capabilities = capabilities, + filetypes= { 'c', 'cpp', 'objc', 'objcpp', 'cuda', 'proto' }, + cmd = { 'clangd' }, + single_file_support = true, + root_dir = function (fname) + return util.root_pattern(unpack(root_files))(fname) + end + }) require('lspconfig')['zls'].setup({ capabilities = capabilities @@ -131,6 +155,10 @@ return require('lspconfig')['gopls'].setup({ capabilities = capabilities }) + + require('lspconfig')['tsserver'].setup({ + capabilities = capabilities + }) end } diff --git a/lua/barink/plugins/neo-tree.lua b/lua/barink/plugins/neo-tree.lua new file mode 100644 index 0000000..5d1acc2 --- /dev/null +++ b/lua/barink/plugins/neo-tree.lua @@ -0,0 +1,9 @@ +return { + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + "MunifTanjim/nui.nvim" + }, +} diff --git a/lua/barink/plugins/telescope.lua b/lua/barink/plugins/telescope.lua index 52cd44e..87db0b3 100644 --- a/lua/barink/plugins/telescope.lua +++ b/lua/barink/plugins/telescope.lua @@ -6,15 +6,7 @@ return { {'nvim-lua/plenary.nvim'}, { 'nvim-telescope/telescope-fzf-native.nvim', - 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, + build ="cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build", } }, config = function() diff --git a/lua/barink/plugins/todo-comments.lua b/lua/barink/plugins/todo-comments.lua new file mode 100644 index 0000000..8702948 --- /dev/null +++ b/lua/barink/plugins/todo-comments.lua @@ -0,0 +1,8 @@ +return { + "folke/todo-comments.nvim", + dependencies = { + "nvim-lua/plenary.nvim" + }, + opts = { + } +} diff --git a/lua/barink/plugins/treesitter.lua b/lua/barink/plugins/treesitter.lua index 0b0b99e..4e32cfd 100644 --- a/lua/barink/plugins/treesitter.lua +++ b/lua/barink/plugins/treesitter.lua @@ -1,14 +1,33 @@ return { + { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", + dependencies = { + { + "nvim-treesitter/playground", + }, + }, config = function() + require 'nvim-treesitter.install'.compilers = {'clang'} local configs = require("nvim-treesitter.configs") configs.setup({ + playground = { + enable = true, + disable = {}, + updatetime = 25, + keybindings = { + toggle_query_editor = 'o', + toggle_hl_groups = 'i', + update = 'R', + show_help = '?' + } + }, ensure_installed = { "c", "lua", "vim", "vimdoc", "bash" }, sync_install = false, highlight = { enable = true }, indent = { enable = true }, }) end - } + }, + } diff --git a/lua/barink/plugins/which-key.lua b/lua/barink/plugins/which-key.lua new file mode 100644 index 0000000..4696062 --- /dev/null +++ b/lua/barink/plugins/which-key.lua @@ -0,0 +1,15 @@ +return { + "folke/which-key.nvim", + event = "VeryLazy", + opts = { + }, + keys = { + { + "?", + function() + require("which-key").show({global = false}) + end, + desc = "Buffer Local Keymaps (which-key)", + } + } +}