From c54a10cab354536aef680510679d17053508b187 Mon Sep 17 00:00:00 2001 From: aloslider <53711835+aloslider@users.noreply.github.com> Date: Wed, 1 Apr 2026 14:37:55 +0300 Subject: [PATCH] Add neovim config --- dot_config/nvim/benq/init.lua | 31 ++++++ dot_config/nvim/benq/lazy-lock.json | 57 ++++++++++ dot_config/nvim/benq/lsp/lua_ls.lua | 9 ++ dot_config/nvim/benq/lsp/vtsls.lua | 54 +++++++++ dot_config/nvim/benq/lua/config/autocmds.lua | 40 +++++++ dot_config/nvim/benq/lua/config/keymaps.lua | 82 ++++++++++++++ dot_config/nvim/benq/lua/config/lazy.lua | 26 +++++ .../nvim/benq/lua/config/lsp/roslyn.lua | 33 ++++++ dot_config/nvim/benq/lua/config/options.lua | 34 ++++++ dot_config/nvim/benq/lua/config/theme.lua | 1 + .../nvim/benq/lua/plugins/editor/ai.lua | 5 + .../nvim/benq/lua/plugins/editor/align.lua | 5 + .../benq/lua/plugins/editor/autopairs.lua | 5 + .../nvim/benq/lua/plugins/editor/autotag.lua | 5 + .../nvim/benq/lua/plugins/editor/blink.lua | 27 +++++ .../benq/lua/plugins/editor/bracketed.lua | 5 + .../nvim/benq/lua/plugins/editor/conform.lua | 55 +++++++++ .../benq/lua/plugins/editor/cursorword.lua | 7 ++ .../benq/lua/plugins/editor/identscope.lua | 11 ++ .../nvim/benq/lua/plugins/editor/jump.lua | 20 ++++ .../nvim/benq/lua/plugins/editor/surround.lua | 5 + .../benq/lua/plugins/editor/treesitter.lua | 32 ++++++ .../benq/lua/plugins/features/bufremove.lua | 5 + .../nvim/benq/lua/plugins/features/dadbod.lua | 19 ++++ .../benq/lua/plugins/features/debugging.lua | 55 +++++++++ .../benq/lua/plugins/features/diffview.lua | 33 ++++++ .../benq/lua/plugins/features/fzf-lua.lua | 105 ++++++++++++++++++ .../benq/lua/plugins/features/gitsigns.lua | 14 +++ .../benq/lua/plugins/features/lazygit.lua | 17 +++ .../benq/lua/plugins/features/neo-tree.lua | 27 +++++ .../nvim/benq/lua/plugins/features/oil.lua | 14 +++ .../nvim/benq/lua/plugins/features/sshfs.lua | 15 +++ .../benq/lua/plugins/features/testing.lua | 21 ++++ .../language-specific/dotnet/debugging.lua | 26 +++++ .../language-specific/dotnet/testing.lua | 4 + .../language-specific/dotnet/tools.lua | 18 +++ .../benq/lua/plugins/lsp/lsp-signature.lua | 21 ++++ .../nvim/benq/lua/plugins/lsp/mason.lua | 38 +++++++ .../nvim/benq/lua/plugins/lsp/roslyn.lua | 6 + .../nvim/benq/lua/plugins/ui/bufferline.lua | 6 + .../nvim/benq/lua/plugins/ui/colorizer.lua | 5 + dot_config/nvim/benq/lua/plugins/ui/diff.lua | 20 ++++ .../nvim/benq/lua/plugins/ui/notify.lua | 8 ++ .../nvim/benq/lua/plugins/ui/screenkey.lua | 7 ++ .../nvim/benq/lua/plugins/ui/statusline.lua | 12 ++ .../nvim/benq/lua/plugins/ui/themes.lua | 20 ++++ .../benq/lua/plugins/ui/tiny-diagnostics.lua | 19 ++++ .../nvim/benq/lua/plugins/ui/which-key.lua | 16 +++ 48 files changed, 1100 insertions(+) create mode 100644 dot_config/nvim/benq/init.lua create mode 100644 dot_config/nvim/benq/lazy-lock.json create mode 100644 dot_config/nvim/benq/lsp/lua_ls.lua create mode 100644 dot_config/nvim/benq/lsp/vtsls.lua create mode 100644 dot_config/nvim/benq/lua/config/autocmds.lua create mode 100644 dot_config/nvim/benq/lua/config/keymaps.lua create mode 100644 dot_config/nvim/benq/lua/config/lazy.lua create mode 100644 dot_config/nvim/benq/lua/config/lsp/roslyn.lua create mode 100644 dot_config/nvim/benq/lua/config/options.lua create mode 100644 dot_config/nvim/benq/lua/config/theme.lua create mode 100644 dot_config/nvim/benq/lua/plugins/editor/ai.lua create mode 100644 dot_config/nvim/benq/lua/plugins/editor/align.lua create mode 100644 dot_config/nvim/benq/lua/plugins/editor/autopairs.lua create mode 100644 dot_config/nvim/benq/lua/plugins/editor/autotag.lua create mode 100644 dot_config/nvim/benq/lua/plugins/editor/blink.lua create mode 100644 dot_config/nvim/benq/lua/plugins/editor/bracketed.lua create mode 100644 dot_config/nvim/benq/lua/plugins/editor/conform.lua create mode 100644 dot_config/nvim/benq/lua/plugins/editor/cursorword.lua create mode 100644 dot_config/nvim/benq/lua/plugins/editor/identscope.lua create mode 100644 dot_config/nvim/benq/lua/plugins/editor/jump.lua create mode 100644 dot_config/nvim/benq/lua/plugins/editor/surround.lua create mode 100644 dot_config/nvim/benq/lua/plugins/editor/treesitter.lua create mode 100644 dot_config/nvim/benq/lua/plugins/features/bufremove.lua create mode 100644 dot_config/nvim/benq/lua/plugins/features/dadbod.lua create mode 100644 dot_config/nvim/benq/lua/plugins/features/debugging.lua create mode 100644 dot_config/nvim/benq/lua/plugins/features/diffview.lua create mode 100644 dot_config/nvim/benq/lua/plugins/features/fzf-lua.lua create mode 100644 dot_config/nvim/benq/lua/plugins/features/gitsigns.lua create mode 100644 dot_config/nvim/benq/lua/plugins/features/lazygit.lua create mode 100644 dot_config/nvim/benq/lua/plugins/features/neo-tree.lua create mode 100644 dot_config/nvim/benq/lua/plugins/features/oil.lua create mode 100644 dot_config/nvim/benq/lua/plugins/features/sshfs.lua create mode 100644 dot_config/nvim/benq/lua/plugins/features/testing.lua create mode 100644 dot_config/nvim/benq/lua/plugins/language-specific/dotnet/debugging.lua create mode 100644 dot_config/nvim/benq/lua/plugins/language-specific/dotnet/testing.lua create mode 100644 dot_config/nvim/benq/lua/plugins/language-specific/dotnet/tools.lua create mode 100644 dot_config/nvim/benq/lua/plugins/lsp/lsp-signature.lua create mode 100644 dot_config/nvim/benq/lua/plugins/lsp/mason.lua create mode 100644 dot_config/nvim/benq/lua/plugins/lsp/roslyn.lua create mode 100644 dot_config/nvim/benq/lua/plugins/ui/bufferline.lua create mode 100644 dot_config/nvim/benq/lua/plugins/ui/colorizer.lua create mode 100644 dot_config/nvim/benq/lua/plugins/ui/diff.lua create mode 100644 dot_config/nvim/benq/lua/plugins/ui/notify.lua create mode 100644 dot_config/nvim/benq/lua/plugins/ui/screenkey.lua create mode 100644 dot_config/nvim/benq/lua/plugins/ui/statusline.lua create mode 100644 dot_config/nvim/benq/lua/plugins/ui/themes.lua create mode 100644 dot_config/nvim/benq/lua/plugins/ui/tiny-diagnostics.lua create mode 100644 dot_config/nvim/benq/lua/plugins/ui/which-key.lua diff --git a/dot_config/nvim/benq/init.lua b/dot_config/nvim/benq/init.lua new file mode 100644 index 0000000..17a6a63 --- /dev/null +++ b/dot_config/nvim/benq/init.lua @@ -0,0 +1,31 @@ +require("config.autocmds") +require("config.options") +require("config.keymaps") + +require("config.lazy") +require("config.theme") -- ignored by git + +vim.lsp.config("roslyn", require("config.lsp.roslyn")) + +vim.lsp.enable({ "nixd" }) -- installed locally + +-- Set custom breakpoint style +vim.fn.sign_define('DapBreakpoint', { + text = '⚪', + texthl = 'DapBreakpointSymbol', + linehl = 'DapBreakpoint', + numhl = 'DapBreakpoint' +}) +vim.fn.sign_define('DapStopped', { + text = '🔴', + texthl = 'yellow', + linehl = 'DapBreakpoint', + numhl = 'DapBreakpoint' +}) +vim.fn.sign_define('DapBreakpointRejected', { + text = '⭕', + texthl = 'DapStoppedSymbol', + linehl = 'DapBreakpoint', + numhl = 'DapBreakpoint' +}) + diff --git a/dot_config/nvim/benq/lazy-lock.json b/dot_config/nvim/benq/lazy-lock.json new file mode 100644 index 0000000..434748e --- /dev/null +++ b/dot_config/nvim/benq/lazy-lock.json @@ -0,0 +1,57 @@ +{ + "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, + "blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" }, + "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, + "conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" }, + "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, + "easy-dotnet.nvim": { "branch": "main", "commit": "9a761b062e911dd709c6b31e857038e6c4981654" }, + "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, + "fzf-lua": { "branch": "main", "commit": "d9508cc1d05ffcdc91a32dfd38fc1013a56b20da" }, + "gitsigns.nvim": { "branch": "main", "commit": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3" }, + "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, + "lazygit.nvim": { "branch": "main", "commit": "a04ad0dbc725134edbee3a5eea29290976695357" }, + "lsp_signature.nvim": { "branch": "master", "commit": "af7e4074d85d785cf6614352ba9ad3b28a1f8a56" }, + "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "a324581a3c83fdacdb9804b79de1cbe00ce18550" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" }, + "mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" }, + "midnight.nvim": { "branch": "main", "commit": "fe062a6f2e5bd77cd8a260f61e6e12789eaf4f13" }, + "mini.ai": { "branch": "main", "commit": "bfb26d9072670c3aaefab0f53024b2f3729c8083" }, + "mini.align": { "branch": "main", "commit": "4d45e0e4f1fd8baefb6ae52a44659704fe7ebe8b" }, + "mini.bracketed": { "branch": "main", "commit": "75369c33613b911d1ce304475dc4d30cd255c9ed" }, + "mini.bufremove": { "branch": "main", "commit": "ee69f823f84508c556127a5882760d9783692023" }, + "mini.cursorword": { "branch": "main", "commit": "dda0f57d55bb1fa19423b7201b2ba892c7d2bb3c" }, + "mini.diff": { "branch": "main", "commit": "ff3cd5e76e812fa18bde0f8126d6f3bb62008c79" }, + "mini.indentscope": { "branch": "main", "commit": "0308f949f31769e509696af5d5f91cebb2159c69" }, + "mini.jump": { "branch": "main", "commit": "e79d45a15097bf3a5101e917be73e9e43f80f1b7" }, + "mini.notify": { "branch": "main", "commit": "29ec27f60bf4b63e447c851d9061c434d80795a6" }, + "mini.pairs": { "branch": "main", "commit": "b7fde3719340946feb75017ef9d75edebdeb0566" }, + "mini.surround": { "branch": "main", "commit": "d205d1741d1fcc1f3117b4e839bf00f74ad72fa2" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "9d6826582a3e8c84787bd7355df22a2812a1ad59" }, + "neonuget": { "branch": "main", "commit": "bc174044b009a19a6fa39fbcb5b90ddf1f874267" }, + "neotest": { "branch": "master", "commit": "deadfb1af5ce458742671ad3a013acb9a6b41178" }, + "neotest-vstest": { "branch": "main", "commit": "0bf64ea98fc8e6ca168424ad48f13f7ff1895311" }, + "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "ef211089af881bea206c7aa3f2693a81feee7e90" }, + "nvim-dap": { "branch": "master", "commit": "a9d8cb68ee7184111dc66156c4a2ebabfbe01bc5" }, + "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, + "nvim-lspconfig": { "branch": "master", "commit": "0203a9608d63eda57679b01e69f33a7b4c34b0d1" }, + "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, + "nvim-treesitter": { "branch": "main", "commit": "5cb05e1b0fa3c469958a2b26f36b3fe930af221c" }, + "nvim-treesitter-textobjects": { "branch": "main", "commit": "4e91b5d0394329a229725b021a8ea217099826ef" }, + "nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" }, + "nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" }, + "oasis.nvim": { "branch": "main", "commit": "fe388c81d31f4ae974b93619608e4e2a1e9b10a8" }, + "oil.nvim": { "branch": "master", "commit": "0fcc83805ad11cf714a949c98c605ed717e0b83e" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, + "ramboe-dotnet-utils": { "branch": "main", "commit": "051ed455e797853b548f857f895c81599803ba12" }, + "roslyn.nvim": { "branch": "main", "commit": "7deb9bb5b6afcb3c03c70741c6d364ffd8b59bda" }, + "screenkey.nvim": { "branch": "main", "commit": "16390931d847b1d5d77098daccac4e55654ac9e2" }, + "sshfs.nvim": { "branch": "main", "commit": "6071224a845d4bb6d70a0ed912797281a80e109d" }, + "tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "ba133b3e932416e4b9507095731a6d7276878fe8" }, + "vim-dadbod": { "branch": "master", "commit": "6d1d41da4873a445c5605f2005ad2c68c99d8770" }, + "vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" }, + "vim-dadbod-ui": { "branch": "master", "commit": "07e92e22114cc5b1ba4938d99897d85b58e20475" }, + "vscode.nvim": { "branch": "main", "commit": "aa1102a7e15195c9cca22730b09224a7f7745ba8" }, + "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } +} diff --git a/dot_config/nvim/benq/lsp/lua_ls.lua b/dot_config/nvim/benq/lsp/lua_ls.lua new file mode 100644 index 0000000..212a952 --- /dev/null +++ b/dot_config/nvim/benq/lsp/lua_ls.lua @@ -0,0 +1,9 @@ +return { + settings = { + Lua = { + workspace = { + library = vim.api.nvim_get_runtime_file("", true), + }, + }, + }, +} diff --git a/dot_config/nvim/benq/lsp/vtsls.lua b/dot_config/nvim/benq/lsp/vtsls.lua new file mode 100644 index 0000000..b3eadd1 --- /dev/null +++ b/dot_config/nvim/benq/lsp/vtsls.lua @@ -0,0 +1,54 @@ +local vue_language_server_path = vim.fn.expand "$MASON/packages" .. "/vue-language-server" .. "/node_modules/@vue/language-server" + +return { + cmd = { "vtsls", "--stdio" }, + init_options = { + hostInfo = "neovim", + }, + filetypes = { + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "vue", + }, + root_dir = function(bufnr, on_dir) + -- The project root is where the LSP can be started from + -- As stated in the documentation above, this LSP supports monorepos and simple projects. + -- We select then from the project root, which is identified by the presence of a package + -- manager lock file. + local root_markers = { "package-lock.json", "yarn.lock", "pnpm-lock.yaml", "bun.lockb", "bun.lock" } + -- Give the root markers equal priority by wrapping them in a table + root_markers = vim.fn.has("nvim-0.11.3") == 1 and { root_markers, { ".git" } } + or vim.list_extend(root_markers, { ".git" }) + -- exclude deno + local deno_root = vim.fs.root(bufnr, { "deno.json", "deno.jsonc" }) + local deno_lock_root = vim.fs.root(bufnr, { "deno.lock" }) + local project_root = vim.fs.root(bufnr, root_markers) + if deno_lock_root and (not project_root or #deno_lock_root > #project_root) then + -- deno lock is closer than package manager lock, abort + return + end + if deno_root and (not project_root or #deno_root >= #project_root) then + -- deno config is closer than or equal to package manager lock, abort + return + end + -- project is standard TS, not deno + -- We fallback to the current working directory if no project root is found + on_dir(project_root or vim.fn.getcwd()) + end, + settings = { + vtsls = { + tsserver = { + globalPlugins = { + { + name = "@vue/typescript-plugin", + location = vue_language_server_path, + languages = { "vue" }, + configNamespace = "typescript", + } + } + } + } + }, +} diff --git a/dot_config/nvim/benq/lua/config/autocmds.lua b/dot_config/nvim/benq/lua/config/autocmds.lua new file mode 100644 index 0000000..3087c8f --- /dev/null +++ b/dot_config/nvim/benq/lua/config/autocmds.lua @@ -0,0 +1,40 @@ +-- Highlight on yanking +vim.api.nvim_create_autocmd("TextYankPost", { + desc = "Highlight in yanking", + group = vim.api.nvim_create_augroup("highlight-yank", { clear = true }), + callback = function() + vim.highlight.on_yank() + end, +}) + +-- LSP +vim.keymap.del('n', "gra") +vim.keymap.del('n', "gri") +vim.keymap.del('n', "grn") +vim.keymap.del('n', "grr") +vim.keymap.del('n', "grt") + +vim.api.nvim_create_autocmd("LspAttach", { + group = vim.api.nvim_create_augroup("LspKeymaps", { clear = true }), + desc = "LSP keymaps", + callback = function(event) + local map = function(keys, func, desc, mode) + mode = mode or "n" + vim.keymap.set(mode, keys, func, { + buffer = event.buf, + desc = "[LSP] " .. desc, + noremap = true, + silent = true, + }) + end + + map("ra", vim.lsp.buf.code_action, "Code action") + map("rn", vim.lsp.buf.rename, "Rename") + map("rr", vim.lsp.buf.references, "References") + map("ri", vim.lsp.buf.implementation, "Go to implementation") + map("rt", vim.lsp.buf.type_definition, "Go to type definition") + map("rd", vim.lsp.buf.definition, "Go to definition") + map("rD", vim.lsp.buf.declaration, "Go to declaration") + map("K", vim.lsp.buf.hover, "Hover documentation") + end, +}) diff --git a/dot_config/nvim/benq/lua/config/keymaps.lua b/dot_config/nvim/benq/lua/config/keymaps.lua new file mode 100644 index 0000000..6828363 --- /dev/null +++ b/dot_config/nvim/benq/lua/config/keymaps.lua @@ -0,0 +1,82 @@ +-- Leader +vim.g.mapleader = " " +vim.g.maplocalleader = "\\" + +-- Clear search highlight +vim.keymap.set("n", "", + function() + vim.cmd('noh') + vim.lsp.buf.clear_references() + end, + { desc = "Clear search highlight" }) + +-- Toggle whitespace characters +vim.keymap.set('n', 'w', function() + if vim.wo.list then + vim.wo.list = false + else + vim.opt.listchars = { + eol = '¬', + tab = '>·', + trail = '~', + extends = '>', + precedes = '<', + space = '␣' + } + vim.wo.list = true + end +end, { desc = 'Toggle whitespace characters' }) + +-- Move current line/selection up/down +vim.keymap.set("n", "", ":m .+1==", { desc = "Move line down", silent = true }) +vim.keymap.set("n", "", ":m .-2==", { desc = "Move line up", silent = true }) +vim.keymap.set("v", "", ":m '>+1gv=gv", { desc = "Move selection down", silent = true }) +vim.keymap.set("v", "", ":m '<-2gv=gv", { desc = "Move selection up", silent = true }) + +-- Buffers +vim.keymap.set({ "n", "v" }, "bn", "enew", { desc = "New buffer" }) +vim.keymap.set({ "n", "v" }, "bd", "bdelete", { desc = "Close buffer" }) +vim.keymap.set({ "n", "v" }, "bD", "bdelete!", { desc = "Close buffer (force)" }) +vim.keymap.set({ "n", "v" }, "", "bprevious", { desc = "Prev buffer" }) +vim.keymap.set({ "n", "v" }, "", "bnext", { desc = "Next buffer" }) + +-- Tabs +vim.keymap.set({ "n", "v" }, "n", "tabnew", { desc = "New tab" }) +vim.keymap.set({ "n", "v" }, "d", "tabclose", { desc = "Close tab" }) +vim.keymap.set({ "n", "v" }, "]", "tabnext", { desc = "Next tab" }) +vim.keymap.set({ "n", "v" }, "[", "tabprevious", { desc = "Previous tab" }) +vim.keymap.set({ "n", "v" }, "l", "tablast", { desc = "Last tab" }) +vim.keymap.set({ "n", "v" }, "f", "tabfirst", { desc = "First tab" }) + +-- Windows +vim.keymap.set({ "n", "v" }, "", "resize +2", { desc = "Increase window height" }) +vim.keymap.set({ "n", "v" }, "", "resize -2", { desc = "Decrease window height" }) +vim.keymap.set({ "n", "v" }, "", "vertical resize -2", { desc = "Decrease window width" }) +vim.keymap.set({ "n", "v" }, "", "vertical resize +2", { desc = "Increase window width" }) + +vim.keymap.set("n", "-", "split", { desc = "Split window horizontally" }) +vim.keymap.set("n", "|", "vsplit", { desc = "Split window vertically" }) + +-- Diagnostics +vim.keymap.set('n', "ld", vim.diagnostic.open_float, { desc = "Show line diagnostics" }) + +-- Quickfix +vim.keymap.set("n", "q", + function() + local qf_exists = false + for _, win in pairs(vim.fn.getwininfo()) do + if win["quickfix"] == 1 then + qf_exists = true + end + end + if qf_exists == true then + vim.cmd "cclose" + return + end + if not vim.tbl_isempty(vim.fn.getqflist()) then + vim.cmd "copen" + end + end, + { desc = "Toggle quickfix" }) +vim.keymap.set("n", "[q", "cprev", { desc = "Previous quickfix item" }) +vim.keymap.set("n", "]q", "cnext", { desc = "Next quickfix item" }) diff --git a/dot_config/nvim/benq/lua/config/lazy.lua b/dot_config/nvim/benq/lua/config/lazy.lua new file mode 100644 index 0000000..4b456e3 --- /dev/null +++ b/dot_config/nvim/benq/lua/config/lazy.lua @@ -0,0 +1,26 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + +require("lazy").setup({ + spec = { + { import = "plugins.editor" }, + { import = "plugins.features" }, + { import = "plugins.language-specific.dotnet" }, + { import = "plugins.lsp" }, + { import = "plugins.ui" }, + }, + checker = { enabled = false }, +}) diff --git a/dot_config/nvim/benq/lua/config/lsp/roslyn.lua b/dot_config/nvim/benq/lua/config/lsp/roslyn.lua new file mode 100644 index 0000000..151ec33 --- /dev/null +++ b/dot_config/nvim/benq/lua/config/lsp/roslyn.lua @@ -0,0 +1,33 @@ +return { + settings = { + ["csharp|background_analysis"] = { + dotnet_analyzer_diagnostics_scope = "fullSolution", + dotnet_compiler_diagnostics_scope = "fullSolution", + }, + ["csharp|inlay_hints"] = { + csharp_enable_inlay_hints_for_implicit_object_creation = true, + csharp_enable_inlay_hints_for_implicit_variable_types = true, + csharp_enable_inlay_hints_for_lambda_parameter_types = true, + csharp_enable_inlay_hints_for_types = true, + dotnet_enable_inlay_hints_for_indexer_parameters = true, + dotnet_enable_inlay_hints_for_literal_parameters = true, + dotnet_enable_inlay_hints_for_object_creation_parameters = true, + dotnet_enable_inlay_hints_for_other_parameters = true, + dotnet_enable_inlay_hints_for_parameters = true, + dotnet_suppress_inlay_hints_for_parameters_that_differ_only_by_suffix = true, + dotnet_suppress_inlay_hints_for_parameters_that_match_argument_name = true, + dotnet_suppress_inlay_hints_for_parameters_that_match_method_intent = true, + }, + ["csharp|symbol_search"] = { + dotnet_search_reference_assemblies = true, + }, + ["csharp|completion"] = { + dotnet_show_name_completion_suggestions = true, + dotnet_show_completion_items_from_unimported_namespaces = true, + dotnet_provide_regex_completions = true, + }, + ["csharp|code_lens"] = { + dotnet_enable_references_code_lens = true, + }, + }, +} diff --git a/dot_config/nvim/benq/lua/config/options.lua b/dot_config/nvim/benq/lua/config/options.lua new file mode 100644 index 0000000..544d23c --- /dev/null +++ b/dot_config/nvim/benq/lua/config/options.lua @@ -0,0 +1,34 @@ +vim.opt.winborder = "rounded" +vim.opt.expandtab = true +vim.opt.tabstop = 2 +vim.opt.shiftwidth = 2 +vim.opt.softtabstop = 2 +vim.opt.showtabline = 2 +vim.opt.signcolumn = "yes" +vim.opt.showmode = false +vim.opt.wrap = true +vim.opt.cursorcolumn = false +vim.opt.ignorecase = true +vim.opt.smartindent = true +vim.opt.termguicolors = true +vim.opt.undofile = true +vim.opt.number = true +vim.opt.relativenumber = false +-- vim.o.cmdheight=0 +vim.opt.list = false +vim.opt.listchars = { + tab = "→ ", + space = "·", + nbsp = "⍽", + trail = "·", + extends = "…", + precedes = "…", + eol = "↲", +} + +vim.filetype.add({ + pattern = { + ["%.sh%.tmpl$"] = "sh", + ["%.toml%.tmpl$"] = "toml", + } +}) diff --git a/dot_config/nvim/benq/lua/config/theme.lua b/dot_config/nvim/benq/lua/config/theme.lua new file mode 100644 index 0000000..d23d360 --- /dev/null +++ b/dot_config/nvim/benq/lua/config/theme.lua @@ -0,0 +1 @@ +vim.cmd.colorscheme("vscode") diff --git a/dot_config/nvim/benq/lua/plugins/editor/ai.lua b/dot_config/nvim/benq/lua/plugins/editor/ai.lua new file mode 100644 index 0000000..cef5e37 --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/editor/ai.lua @@ -0,0 +1,5 @@ +return { + "nvim-mini/mini.ai", + version = '*', + opts = {}, +} diff --git a/dot_config/nvim/benq/lua/plugins/editor/align.lua b/dot_config/nvim/benq/lua/plugins/editor/align.lua new file mode 100644 index 0000000..01adb4d --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/editor/align.lua @@ -0,0 +1,5 @@ +return { + "nvim-mini/mini.align", + version = false, + opts = {} +} diff --git a/dot_config/nvim/benq/lua/plugins/editor/autopairs.lua b/dot_config/nvim/benq/lua/plugins/editor/autopairs.lua new file mode 100644 index 0000000..44aa27c --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/editor/autopairs.lua @@ -0,0 +1,5 @@ +return { + "nvim-mini/mini.pairs", + version = false, + opts = {} +} diff --git a/dot_config/nvim/benq/lua/plugins/editor/autotag.lua b/dot_config/nvim/benq/lua/plugins/editor/autotag.lua new file mode 100644 index 0000000..7927b8e --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/editor/autotag.lua @@ -0,0 +1,5 @@ +return { + "windwp/nvim-ts-autotag", + event = "BufReadPre", + opts = {} +} diff --git a/dot_config/nvim/benq/lua/plugins/editor/blink.lua b/dot_config/nvim/benq/lua/plugins/editor/blink.lua new file mode 100644 index 0000000..e3be96c --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/editor/blink.lua @@ -0,0 +1,27 @@ +return { + "saghen/blink.cmp", + version = "1.*", + ---@module "blink.cmp" + ---@type blink.cmp.Config + opts = { + keymap = { preset = "default" }, + appearance = { + nerd_font_variant = "mono" + }, + completion = { documentation = { auto_show = true } }, + sources = { + default = { "lsp", "path", "snippets", "buffer" }, + per_filetype = { + sql = { "dadbod" }, + lua = { + inherit_defaults = true, + } + }, + providers = { + dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" }, + }, + }, + fuzzy = { implementation = "prefer_rust_with_warning" }, + }, + opts_extend = { "sources.default" } +} diff --git a/dot_config/nvim/benq/lua/plugins/editor/bracketed.lua b/dot_config/nvim/benq/lua/plugins/editor/bracketed.lua new file mode 100644 index 0000000..d1988ca --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/editor/bracketed.lua @@ -0,0 +1,5 @@ +return { + "nvim-mini/mini.bracketed", + version = false, + opts = {}, +} diff --git a/dot_config/nvim/benq/lua/plugins/editor/conform.lua b/dot_config/nvim/benq/lua/plugins/editor/conform.lua new file mode 100644 index 0000000..74d73a5 --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/editor/conform.lua @@ -0,0 +1,55 @@ +return { + "stevearc/conform.nvim", + opts = { + async = true, + formatters_by_ft = { + cs = { "csharpier" }, + csproj = { "xmlformat" }, + css = { "prettier" }, + html = { "prettier" }, + nix = { "nixfmt" }, + xml = { "xmlformat" }, + }, + formatters = { + xmlformat = { + command = "xmlformat", + }, + csharpier = { + command = "csharpier", + args = { + "format", + "--write-stdout", + }, + to_stdin = true, + }, + }, + }, + keys = { + { + mode = { "n", "v" }, + "cF", + function() + require("conform").format({ async = true, lsp_fallback = true }) + end, + desc = "Format buffer", + }, + { + mode = "n", + "cf", + function() + local start_line = vim.fn.line(".") + local end_line = start_line + + require("conform").format({ + async = true, + lsp_fallback = true, + range = { + start = { start_line, 0 }, + ["end"] = { end_line, 999999 }, + }, + }) + end, + desc = "Format line", + }, + } +} diff --git a/dot_config/nvim/benq/lua/plugins/editor/cursorword.lua b/dot_config/nvim/benq/lua/plugins/editor/cursorword.lua new file mode 100644 index 0000000..8e22c87 --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/editor/cursorword.lua @@ -0,0 +1,7 @@ +return { + "nvim-mini/mini.cursorword", + version = "*", + opts = { + delay = 0, + } +} diff --git a/dot_config/nvim/benq/lua/plugins/editor/identscope.lua b/dot_config/nvim/benq/lua/plugins/editor/identscope.lua new file mode 100644 index 0000000..f1afe14 --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/editor/identscope.lua @@ -0,0 +1,11 @@ +return { + "nvim-mini/mini.indentscope", + version = "*", + opts = { + draw = { + animation = function (_,_) return 0 end, + delay = 0, + }, + symbol = "│" + } +} diff --git a/dot_config/nvim/benq/lua/plugins/editor/jump.lua b/dot_config/nvim/benq/lua/plugins/editor/jump.lua new file mode 100644 index 0000000..987fc1e --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/editor/jump.lua @@ -0,0 +1,20 @@ +return { + { + "folke/flash.nvim", + event = "VeryLazy", + ---@type Flash.Config + opts = {}, + keys = { + { "", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" }, + { "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" }, + { "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" }, + { "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" }, + { "", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" }, + }, + }, + { + "nvim-mini/mini.jump", + version = false, + opts = {} + } +} diff --git a/dot_config/nvim/benq/lua/plugins/editor/surround.lua b/dot_config/nvim/benq/lua/plugins/editor/surround.lua new file mode 100644 index 0000000..91ce391 --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/editor/surround.lua @@ -0,0 +1,5 @@ +return { + "nvim-mini/mini.surround", + version = false, + opts = {} +} diff --git a/dot_config/nvim/benq/lua/plugins/editor/treesitter.lua b/dot_config/nvim/benq/lua/plugins/editor/treesitter.lua new file mode 100644 index 0000000..dad21bf --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/editor/treesitter.lua @@ -0,0 +1,32 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + lazy = false, + build = ":TSUpdate", + config = function() + require("nvim-treesitter").install({ + "c", + "caddy", + "c_sharp", + "css", + "csv", + "html", + "javascript", + "json", + "nix", + "sql", + "typescript", + "vimdoc", + "zsh", + }) + end, + }, + { + "nvim-treesitter/nvim-treesitter-textobjects", + branch = "main", + init = function() + vim.g.no_plugin_maps = true + end, + opts = {} + } +} diff --git a/dot_config/nvim/benq/lua/plugins/features/bufremove.lua b/dot_config/nvim/benq/lua/plugins/features/bufremove.lua new file mode 100644 index 0000000..8e9841b --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/features/bufremove.lua @@ -0,0 +1,5 @@ +return { + "nvim-mini/mini.bufremove", + version = false, + opts = {} +} diff --git a/dot_config/nvim/benq/lua/plugins/features/dadbod.lua b/dot_config/nvim/benq/lua/plugins/features/dadbod.lua new file mode 100644 index 0000000..495f4a8 --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/features/dadbod.lua @@ -0,0 +1,19 @@ +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, + keys = { + { "db", "DBUI", desc = "Open DBUI" }, + } +} diff --git a/dot_config/nvim/benq/lua/plugins/features/debugging.lua b/dot_config/nvim/benq/lua/plugins/features/debugging.lua new file mode 100644 index 0000000..b333693 --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/features/debugging.lua @@ -0,0 +1,55 @@ +return { + { + "mfussenegger/nvim-dap", + event = "VeryLazy", + dependencies = { + "rcarriga/nvim-dap-ui", + }, + keys = { + { "", function() require("dap").continue() end, desc = "[DBG] Continue" }, + { "", function() require("dap").terminate() end, desc = "[DBG] Terminate" }, + { "", function() require("dap").step_out() end, desc = "[DBG] Step out" }, + { "", function() require("dap").toggle_breakpoint() end, desc = "[DBG] Toggle breakpoint" }, + { "", function() require("dap").step_over() end, desc = "[DBG] Step over" }, + { "", function() require("dap").step_into() end, desc = "[DBG] Step into" }, + } + }, + { + "rcarriga/nvim-dap-ui", + dependencies = { + "mfussenegger/nvim-dap" + }, + config = function() + local dap = require("dap") + local dapui = require("dapui") + + -- open ui immediately when debugging starts + dap.listeners.after.event_initialized["dapui_config"] = function() dapui.open() end + dap.listeners.before.event_terminated["dapui_config"] = function() dapui.close() end + dap.listeners.before.event_exited["dapui_config"] = function() dapui.close() end + + dapui.setup({ + expand_lines = true, + controls = { enabled = false }, + floating = { border = "rounded" }, + render = { + max_type_length = 60, + max_value_lines = 200, + }, + layouts = { + { + elements = { + { id = "scopes", size = 1.0 }, + }, + size = 15, + position = "bottom", + }, + }, + }) + end, + keys = { + { "du", function() require("dapui").toggle() end, desc = "Toggle DAP UI", noremap = true, silent = true }, + { "dw", function() require("dapui").eval(nil, { enter = true }) end, desc = "Add word to Watches" }, + } + } +} diff --git a/dot_config/nvim/benq/lua/plugins/features/diffview.lua b/dot_config/nvim/benq/lua/plugins/features/diffview.lua new file mode 100644 index 0000000..7f608a8 --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/features/diffview.lua @@ -0,0 +1,33 @@ +return { + "sindrets/diffview.nvim", + opts = {}, + keys = { + { + "gf", + function() + if vim.fn.exists(":DiffviewClose") == 2 then + local tabnr = vim.api.nvim_get_current_tabpage() + local is_diffview_tab = false + + for _, win in ipairs(vim.api.nvim_tabpage_list_wins(tabnr)) do + local buf = vim.api.nvim_win_get_buf(win) + local ft = vim.bo[buf].filetype + if ft:match("^Diffview") then + is_diffview_tab = true + break + end + end + + if is_diffview_tab then + vim.cmd("DiffviewClose") + else + vim.cmd("DiffviewFileHistory %") + end + else + vim.notify("Diffview not available", vim.log.levels.WARN) + end + end, + desc = "Toggle diffview file history", + }, + } +} diff --git a/dot_config/nvim/benq/lua/plugins/features/fzf-lua.lua b/dot_config/nvim/benq/lua/plugins/features/fzf-lua.lua new file mode 100644 index 0000000..b127b32 --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/features/fzf-lua.lua @@ -0,0 +1,105 @@ +return { + "ibhagwan/fzf-lua", + dependencies = { "nvim-tree/nvim-web-devicons" }, + opts = { + winopts = { + fullscreen = true, + preview = { + layout = "vertical", + vertical = "up:70%", + } + }, + keymap = { + fzf = { + ["ctrl-q"] = "select-all+accept" + } + } + }, + keys = { + { + "ff", + function() require("fzf-lua").files() end, + desc="Find files in project directory" + }, + { + "fg", + function() require("fzf-lua").live_grep() end, + desc="Find by grepping in project directory" + }, + { + "fc", + function() require("fzf-lua").files({cwd=vim.fn.stdpath("config")}) end, + desc="Find in nvim config" + }, + { + "fh", + function() + require("fzf-lua").helptags() + end, + desc = "Find in help", + }, + { + "fk", + function() + require("fzf-lua").keymaps() + end, + desc = "Find keymaps", + }, + { + "fb", + function() + require("fzf-lua").builtin() + end, + desc = "Find built-in FZF", + }, + { + "fw", + function() + require("fzf-lua").grep_cword() + end, + desc = "Find current word", + }, + { + "fW", + function() + require("fzf-lua").grep_cWORD() + end, + desc = "Find current WORD", + }, + { + "fd", + function() + require("fzf-lua").diagnostics_document() + end, + desc = "Find diagnostics", + }, + { + "fr", + function() + require("fzf-lua").resume() + end, + desc = "Find resume", + }, + { + "fo", + function() + require("fzf-lua").oldfiles() + end, + desc = "Find old files", + }, + { + "", + function() + require("fzf-lua").buffers() + end, + desc = "Find existing buffers", + }, + { + "/", + function() + require("fzf-lua").lgrep_curbuf() + end, + desc = "Live grep the current buffer", + }, + } +} diff --git a/dot_config/nvim/benq/lua/plugins/features/gitsigns.lua b/dot_config/nvim/benq/lua/plugins/features/gitsigns.lua new file mode 100644 index 0000000..50de407 --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/features/gitsigns.lua @@ -0,0 +1,14 @@ +return { + "lewis6991/gitsigns.nvim", + opts = { + signs_staged_enable = false, + signcolumn = false, + }, + keys = { + { "gp", function() require("gitsigns").preview_hunk() end, desc = "Preview hunk" }, + { "gs", function() require("gitsigns").stage_hunk() end, desc = "Stage hunk" }, + { "gu", function() require("gitsigns").undo_stage_hunk() end, desc = "Undo stage hunk" }, + { "gr", function() require("gitsigns").reset_hunk() end, desc = "Reset hunk" }, + { "gb", function() require("gitsigns").blame_line() end, desc = "Blame line" }, + } +} diff --git a/dot_config/nvim/benq/lua/plugins/features/lazygit.lua b/dot_config/nvim/benq/lua/plugins/features/lazygit.lua new file mode 100644 index 0000000..b696c57 --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/features/lazygit.lua @@ -0,0 +1,17 @@ +return { + "kdheepak/lazygit.nvim", + lazy = true, + cmd = { + "LazyGit", + "LazyGitConfig", + "LazyGitCurrentFile", + "LazyGitFilter", + "LazyGitFilterCurrentFile", + }, + dependencies = { + "nvim-lua/plenary.nvim", + }, + keys = { + { "lg", "LazyGit", desc = "Open lazygit" } + } +} diff --git a/dot_config/nvim/benq/lua/plugins/features/neo-tree.lua b/dot_config/nvim/benq/lua/plugins/features/neo-tree.lua new file mode 100644 index 0000000..bc465a7 --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/features/neo-tree.lua @@ -0,0 +1,27 @@ +return { + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + lazy = false, + dependencies = { + "nvim-lua/plenary.nvim", + "MunifTanjim/nui.nvim", + "nvim-tree/nvim-web-devicons", + }, + opts = { + filesystem = { + hijack_netrw_behavior = "disabled", + follow_current_file = { + enabled = true, + }, + }, + }, + keys = { + { + "e", + function () + require("neo-tree.command").execute({ toggle = true }) + end, + desc = "Open neo-tree" + }, + } +} diff --git a/dot_config/nvim/benq/lua/plugins/features/oil.lua b/dot_config/nvim/benq/lua/plugins/features/oil.lua new file mode 100644 index 0000000..8184acc --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/features/oil.lua @@ -0,0 +1,14 @@ +return { + "stevearc/oil.nvim", + lazy = false, + opts = { + default_file_explorer = true, + view_options = { + show_hidden = true, + }, + }, + dependencies = { "nvim-tree/nvim-web-devicons", }, + keys = { + { "-", "Oil", desc = "Open Oil" } + } +} diff --git a/dot_config/nvim/benq/lua/plugins/features/sshfs.lua b/dot_config/nvim/benq/lua/plugins/features/sshfs.lua new file mode 100644 index 0000000..fd8d45a --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/features/sshfs.lua @@ -0,0 +1,15 @@ +local picker = "fzf-lua" + +return { + "uhs-robert/sshfs.nvim", + opts = { + ui = { + local_picker = { + preferred_picker = picker, + }, + remote_picker = { + preferred_picker = picker, + } + }, + }, +} diff --git a/dot_config/nvim/benq/lua/plugins/features/testing.lua b/dot_config/nvim/benq/lua/plugins/features/testing.lua new file mode 100644 index 0000000..67a3057 --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/features/testing.lua @@ -0,0 +1,21 @@ +return { + { + "nvim-neotest/neotest", + dependencies = { + "nvim-treesitter/nvim-treesitter", + "nvim-neotest/nvim-nio", + "nvim-lua/plenary.nvim", + "antoinemadec/FixCursorHold.nvim", + }, + config = function() + require("neotest").setup({ + adapters = { + require("neotest-vstest") + } + }) + end, + keys = { + { "", function() require("neotest").run.run({strategy = "dap"}) end, desc = "Run tests" }, + } + } +} diff --git a/dot_config/nvim/benq/lua/plugins/language-specific/dotnet/debugging.lua b/dot_config/nvim/benq/lua/plugins/language-specific/dotnet/debugging.lua new file mode 100644 index 0000000..43c6eda --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/language-specific/dotnet/debugging.lua @@ -0,0 +1,26 @@ +return { + "ramboe/ramboe-dotnet-utils", + dependencies = { "mfussenegger/nvim-dap" }, + config = function() + local dap = require("dap") + local utils = require("dap-dll-autopicker") + local mason_path = vim.fn.stdpath("data") .. "/mason/packages/netcoredbg/netcoredbg" + local netcoredbg_adapter = { + type = "executable", + command = mason_path, + args = { "--interpreter=vscode" }, + } + dap.adapters.netcoredbg = netcoredbg_adapter + dap.adapters.coreclr = netcoredbg_adapter + dap.configurations.cs = { + { + type = "coreclr", + name = "launch - netcoredbg", + request = "launch", + program = function() + return utils.build_dll_path() + end, + }, + } + end, +} diff --git a/dot_config/nvim/benq/lua/plugins/language-specific/dotnet/testing.lua b/dot_config/nvim/benq/lua/plugins/language-specific/dotnet/testing.lua new file mode 100644 index 0000000..3db7f11 --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/language-specific/dotnet/testing.lua @@ -0,0 +1,4 @@ +return { + "nsidorenco/neotest-vstest", + dependencies = { "nvim-neotest/neotest" }, +} diff --git a/dot_config/nvim/benq/lua/plugins/language-specific/dotnet/tools.lua b/dot_config/nvim/benq/lua/plugins/language-specific/dotnet/tools.lua new file mode 100644 index 0000000..ecc2e7c --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/language-specific/dotnet/tools.lua @@ -0,0 +1,18 @@ +return { + { + "GustavEikaas/easy-dotnet.nvim", + enabled = false, + dependencies = { "nvim-lua/plenary.nvim", "mfussenegger/nvim-dap", "ibhagwan/fzf-lua", }, + opts = {}, + }, + { + "MonsieurTib/neonuget", + dependencies = { + "nvim-lua/plenary.nvim", + }, + opts = {}, + keys = { + { "nn", "NuGet", desc = "Open NuGet" } + } + } +} diff --git a/dot_config/nvim/benq/lua/plugins/lsp/lsp-signature.lua b/dot_config/nvim/benq/lua/plugins/lsp/lsp-signature.lua new file mode 100644 index 0000000..f121b08 --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/lsp/lsp-signature.lua @@ -0,0 +1,21 @@ +return { + "ray-x/lsp_signature.nvim", + event = "InsertEnter", + opts = { + always_trigger = false, + max_height = 40, + max_width = 10, + doc_lines = 40, + hint_prefix = { + above = "↙ ", + current = "← ", + below = "↖ ", + }, + toggle_key = '', + select_signature_key = '', + }, + keys = { + { mode = { 'n' }, "k", function() vim.lsp.buf.signature_help() end, desc = "Toggle signature help" }, + }, +} + diff --git a/dot_config/nvim/benq/lua/plugins/lsp/mason.lua b/dot_config/nvim/benq/lua/plugins/lsp/mason.lua new file mode 100644 index 0000000..a5039c3 --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/lsp/mason.lua @@ -0,0 +1,38 @@ +return { + { + "mason-org/mason-lspconfig.nvim", + dependencies = { "neovim/nvim-lspconfig", }, + opts = { + ensure_installed = { + "docker_compose_language_service", + "lua_ls", + "html", + -- "roslyn", install with :MasonInstall + "vtsls", + "vue_ls", + }, + }, + }, + { + "jay-babu/mason-nvim-dap.nvim", + dependencies = { "neovim/nvim-lspconfig", }, + opts = { + ensure_installed = { + "coreclr", + } + } + }, + { + "neovim/nvim-lspconfig", + dependencies = { "mason-org/mason.nvim", } + }, + { + "mason-org/mason.nvim", + opts = { + registries = { + "github:mason-org/mason-registry", + "github:Crashdummyy/mason-registry", + }, + } + } +} diff --git a/dot_config/nvim/benq/lua/plugins/lsp/roslyn.lua b/dot_config/nvim/benq/lua/plugins/lsp/roslyn.lua new file mode 100644 index 0000000..2c96bba --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/lsp/roslyn.lua @@ -0,0 +1,6 @@ +return { + "seblyng/roslyn.nvim", + ---@module 'roslyn.config' + ---@type RoslynNvimConfig + opts = {}, +} diff --git a/dot_config/nvim/benq/lua/plugins/ui/bufferline.lua b/dot_config/nvim/benq/lua/plugins/ui/bufferline.lua new file mode 100644 index 0000000..64a08ee --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/ui/bufferline.lua @@ -0,0 +1,6 @@ +return { + "akinsho/bufferline.nvim", + version = "*", + dependencies = "nvim-tree/nvim-web-devicons", + opts = {} +} diff --git a/dot_config/nvim/benq/lua/plugins/ui/colorizer.lua b/dot_config/nvim/benq/lua/plugins/ui/colorizer.lua new file mode 100644 index 0000000..b478e9e --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/ui/colorizer.lua @@ -0,0 +1,5 @@ +return { + "catgoose/nvim-colorizer.lua", + event = "BufReadPre", + opts = {}, +} diff --git a/dot_config/nvim/benq/lua/plugins/ui/diff.lua b/dot_config/nvim/benq/lua/plugins/ui/diff.lua new file mode 100644 index 0000000..375fe8d --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/ui/diff.lua @@ -0,0 +1,20 @@ +return { + "nvim-mini/mini.diff", + version = false, + lazy = false, + config = function() + local diff = require("mini.diff") + diff.setup({ + source = { + diff.gen_source.git(), + diff.gen_source.save() + }, + view = { + style = "number" + } + }) + end, + keys = { + { "h", function() require("mini.diff").toggle_overlay() end, desc = "Toggle hunks view" }, + }, +} diff --git a/dot_config/nvim/benq/lua/plugins/ui/notify.lua b/dot_config/nvim/benq/lua/plugins/ui/notify.lua new file mode 100644 index 0000000..934ef3a --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/ui/notify.lua @@ -0,0 +1,8 @@ +return { + "nvim-mini/mini.notify", + version = "*", + opts = {}, + keys = { + { "", function() require("mini.notify").clear() end, desc = "Clear notification popup" }, + } +} diff --git a/dot_config/nvim/benq/lua/plugins/ui/screenkey.lua b/dot_config/nvim/benq/lua/plugins/ui/screenkey.lua new file mode 100644 index 0000000..d283c82 --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/ui/screenkey.lua @@ -0,0 +1,7 @@ +return { + "NStefan002/screenkey.nvim", + enabled = true, + lazy = false, + version = "*", +} + diff --git a/dot_config/nvim/benq/lua/plugins/ui/statusline.lua b/dot_config/nvim/benq/lua/plugins/ui/statusline.lua new file mode 100644 index 0000000..8c465c5 --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/ui/statusline.lua @@ -0,0 +1,12 @@ +return { + "nvim-lualine/lualine.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + opts = { + sections = { + lualine_a = { "mode" }, + lualine_b = { "branch", 'diff' }, + lualine_y = { "diagnostics" }, + lualine_z = { "location" } + }, + }, +} diff --git a/dot_config/nvim/benq/lua/plugins/ui/themes.lua b/dot_config/nvim/benq/lua/plugins/ui/themes.lua new file mode 100644 index 0000000..6de7386 --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/ui/themes.lua @@ -0,0 +1,20 @@ +return { + { + "dasupradyumna/midnight.nvim", + lazy = false, + priority = 1000, + opts = {}, + }, + { + "uhs-robert/oasis.nvim", + lazy = false, + priority = 1000, + opts = {}, + }, + { + "Mofiqul/vscode.nvim", + lazy = false, + priority = 1000, + opts = {}, + }, +} diff --git a/dot_config/nvim/benq/lua/plugins/ui/tiny-diagnostics.lua b/dot_config/nvim/benq/lua/plugins/ui/tiny-diagnostics.lua new file mode 100644 index 0000000..89fb0d9 --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/ui/tiny-diagnostics.lua @@ -0,0 +1,19 @@ +return { + "rachartier/tiny-inline-diagnostic.nvim", + event = "VeryLazy", + priority = 1000, + config = function() + vim.diagnostic.config({ virtual_text = false }) + require("tiny-inline-diagnostic").setup({ + preset = "classic", + options = { + add_messages = { + disaplay_count = true + }, + multilines = { + enabled = true + } + } + }) + end, +} diff --git a/dot_config/nvim/benq/lua/plugins/ui/which-key.lua b/dot_config/nvim/benq/lua/plugins/ui/which-key.lua new file mode 100644 index 0000000..3fb804b --- /dev/null +++ b/dot_config/nvim/benq/lua/plugins/ui/which-key.lua @@ -0,0 +1,16 @@ +return { + "folke/which-key.nvim", + event = "VeryLazy", + opts = { + preset = "helix", + }, + keys = { + { + "?", + function() + require("which-key").show({ global = false }) + end, + desc = "Buffer Local Keymaps (which-key)", + }, + }, +}