Add neovim config

This commit is contained in:
aloslider
2026-04-01 14:37:55 +03:00
parent 8037d21310
commit c54a10cab3
48 changed files with 1100 additions and 0 deletions
+31
View File
@@ -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'
})
+57
View File
@@ -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" }
}
+9
View File
@@ -0,0 +1,9 @@
return {
settings = {
Lua = {
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
},
},
},
}
+54
View File
@@ -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",
}
}
}
}
},
}
@@ -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("<leader>ra", vim.lsp.buf.code_action, "Code action")
map("<leader>rn", vim.lsp.buf.rename, "Rename")
map("<leader>rr", vim.lsp.buf.references, "References")
map("<leader>ri", vim.lsp.buf.implementation, "Go to implementation")
map("<leader>rt", vim.lsp.buf.type_definition, "Go to type definition")
map("<leader>rd", vim.lsp.buf.definition, "Go to definition")
map("<leader>rD", vim.lsp.buf.declaration, "Go to declaration")
map("<leader>K", vim.lsp.buf.hover, "Hover documentation")
end,
})
@@ -0,0 +1,82 @@
-- Leader
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
-- Clear search highlight
vim.keymap.set("n", "<ESC>",
function()
vim.cmd('noh')
vim.lsp.buf.clear_references()
end,
{ desc = "Clear search highlight" })
-- Toggle whitespace characters
vim.keymap.set('n', '<leader>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", "<A-j>", ":m .+1<CR>==", { desc = "Move line down", silent = true })
vim.keymap.set("n", "<A-k>", ":m .-2<CR>==", { desc = "Move line up", silent = true })
vim.keymap.set("v", "<A-j>", ":m '>+1<CR>gv=gv", { desc = "Move selection down", silent = true })
vim.keymap.set("v", "<A-k>", ":m '<-2<CR>gv=gv", { desc = "Move selection up", silent = true })
-- Buffers
vim.keymap.set({ "n", "v" }, "<leader>bn", "<cmd>enew<cr>", { desc = "New buffer" })
vim.keymap.set({ "n", "v" }, "<leader>bd", "<cmd>bdelete<cr>", { desc = "Close buffer" })
vim.keymap.set({ "n", "v" }, "<leader>bD", "<cmd>bdelete!<cr>", { desc = "Close buffer (force)" })
vim.keymap.set({ "n", "v" }, "<S-h>", "<cmd>bprevious<cr>", { desc = "Prev buffer" })
vim.keymap.set({ "n", "v" }, "<S-l>", "<cmd>bnext<cr>", { desc = "Next buffer" })
-- Tabs
vim.keymap.set({ "n", "v" }, "<leader><tab>n", "<cmd>tabnew<cr>", { desc = "New tab" })
vim.keymap.set({ "n", "v" }, "<leader><tab>d", "<cmd>tabclose<cr>", { desc = "Close tab" })
vim.keymap.set({ "n", "v" }, "<leader><tab>]", "<cmd>tabnext<cr>", { desc = "Next tab" })
vim.keymap.set({ "n", "v" }, "<leader><tab>[", "<cmd>tabprevious<cr>", { desc = "Previous tab" })
vim.keymap.set({ "n", "v" }, "<leader><tab>l", "<cmd>tablast<cr>", { desc = "Last tab" })
vim.keymap.set({ "n", "v" }, "<leader><tab>f", "<cmd>tabfirst<cr>", { desc = "First tab" })
-- Windows
vim.keymap.set({ "n", "v" }, "<C-Up>", "<cmd>resize +2<cr>", { desc = "Increase window height" })
vim.keymap.set({ "n", "v" }, "<C-Down>", "<cmd>resize -2<cr>", { desc = "Decrease window height" })
vim.keymap.set({ "n", "v" }, "<C-Left>", "<cmd>vertical resize -2<cr>", { desc = "Decrease window width" })
vim.keymap.set({ "n", "v" }, "<C-Right>", "<cmd>vertical resize +2<cr>", { desc = "Increase window width" })
vim.keymap.set("n", "<C-w>-", "<cmd>split<cr>", { desc = "Split window horizontally" })
vim.keymap.set("n", "<C-w>|", "<cmd>vsplit<cr>", { desc = "Split window vertically" })
-- Diagnostics
vim.keymap.set('n', "<leader>ld", vim.diagnostic.open_float, { desc = "Show line diagnostics" })
-- Quickfix
vim.keymap.set("n", "<leader>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", "<cmd>cprev<CR>", { desc = "Previous quickfix item" })
vim.keymap.set("n", "]q", "<cmd>cnext<CR>", { desc = "Next quickfix item" })
+26
View File
@@ -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 },
})
@@ -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,
},
},
}
@@ -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",
}
})
@@ -0,0 +1 @@
vim.cmd.colorscheme("vscode")
@@ -0,0 +1,5 @@
return {
"nvim-mini/mini.ai",
version = '*',
opts = {},
}
@@ -0,0 +1,5 @@
return {
"nvim-mini/mini.align",
version = false,
opts = {}
}
@@ -0,0 +1,5 @@
return {
"nvim-mini/mini.pairs",
version = false,
opts = {}
}
@@ -0,0 +1,5 @@
return {
"windwp/nvim-ts-autotag",
event = "BufReadPre",
opts = {}
}
@@ -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" }
}
@@ -0,0 +1,5 @@
return {
"nvim-mini/mini.bracketed",
version = false,
opts = {},
}
@@ -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" },
"<leader>cF",
function()
require("conform").format({ async = true, lsp_fallback = true })
end,
desc = "Format buffer",
},
{
mode = "n",
"<leader>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",
},
}
}
@@ -0,0 +1,7 @@
return {
"nvim-mini/mini.cursorword",
version = "*",
opts = {
delay = 0,
}
}
@@ -0,0 +1,11 @@
return {
"nvim-mini/mini.indentscope",
version = "*",
opts = {
draw = {
animation = function (_,_) return 0 end,
delay = 0,
},
symbol = ""
}
}
@@ -0,0 +1,20 @@
return {
{
"folke/flash.nvim",
event = "VeryLazy",
---@type Flash.Config
opts = {},
keys = {
{ "<cr>", 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" },
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
},
},
{
"nvim-mini/mini.jump",
version = false,
opts = {}
}
}
@@ -0,0 +1,5 @@
return {
"nvim-mini/mini.surround",
version = false,
opts = {}
}
@@ -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 = {}
}
}
@@ -0,0 +1,5 @@
return {
"nvim-mini/mini.bufremove",
version = false,
opts = {}
}
@@ -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 = {
{ "<leader>db", "<cmd>DBUI<cr>", desc = "Open DBUI" },
}
}
@@ -0,0 +1,55 @@
return {
{
"mfussenegger/nvim-dap",
event = "VeryLazy",
dependencies = {
"rcarriga/nvim-dap-ui",
},
keys = {
{ "<F5>", function() require("dap").continue() end, desc = "[DBG] Continue" },
{ "<F7>", function() require("dap").terminate() end, desc = "[DBG] Terminate" },
{ "<F8>", function() require("dap").step_out() end, desc = "[DBG] Step out" },
{ "<F9>", function() require("dap").toggle_breakpoint() end, desc = "[DBG] Toggle breakpoint" },
{ "<F10>", function() require("dap").step_over() end, desc = "[DBG] Step over" },
{ "<F11>", 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 = {
{ "<leader>du", function() require("dapui").toggle() end, desc = "Toggle DAP UI", noremap = true, silent = true },
{ "<leader>dw", function() require("dapui").eval(nil, { enter = true }) end, desc = "Add word to Watches" },
}
}
}
@@ -0,0 +1,33 @@
return {
"sindrets/diffview.nvim",
opts = {},
keys = {
{
"<leader>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",
},
}
}
@@ -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 = {
{
"<leader>ff",
function() require("fzf-lua").files() end,
desc="Find files in project directory"
},
{
"<leader>fg",
function() require("fzf-lua").live_grep() end,
desc="Find by grepping in project directory"
},
{
"<leader>fc",
function() require("fzf-lua").files({cwd=vim.fn.stdpath("config")}) end,
desc="Find in nvim config"
},
{
"<leader>fh",
function()
require("fzf-lua").helptags()
end,
desc = "Find in help",
},
{
"<leader>fk",
function()
require("fzf-lua").keymaps()
end,
desc = "Find keymaps",
},
{
"<leader>fb",
function()
require("fzf-lua").builtin()
end,
desc = "Find built-in FZF",
},
{
"<leader>fw",
function()
require("fzf-lua").grep_cword()
end,
desc = "Find current word",
},
{
"<leader>fW",
function()
require("fzf-lua").grep_cWORD()
end,
desc = "Find current WORD",
},
{
"<leader>fd",
function()
require("fzf-lua").diagnostics_document()
end,
desc = "Find diagnostics",
},
{
"<leader>fr",
function()
require("fzf-lua").resume()
end,
desc = "Find resume",
},
{
"<leader>fo",
function()
require("fzf-lua").oldfiles()
end,
desc = "Find old files",
},
{
"<leader><leader>",
function()
require("fzf-lua").buffers()
end,
desc = "Find existing buffers",
},
{
"<leader>/",
function()
require("fzf-lua").lgrep_curbuf()
end,
desc = "Live grep the current buffer",
},
}
}
@@ -0,0 +1,14 @@
return {
"lewis6991/gitsigns.nvim",
opts = {
signs_staged_enable = false,
signcolumn = false,
},
keys = {
{ "<leader>gp", function() require("gitsigns").preview_hunk() end, desc = "Preview hunk" },
{ "<leader>gs", function() require("gitsigns").stage_hunk() end, desc = "Stage hunk" },
{ "<leader>gu", function() require("gitsigns").undo_stage_hunk() end, desc = "Undo stage hunk" },
{ "<leader>gr", function() require("gitsigns").reset_hunk() end, desc = "Reset hunk" },
{ "<leader>gb", function() require("gitsigns").blame_line() end, desc = "Blame line" },
}
}
@@ -0,0 +1,17 @@
return {
"kdheepak/lazygit.nvim",
lazy = true,
cmd = {
"LazyGit",
"LazyGitConfig",
"LazyGitCurrentFile",
"LazyGitFilter",
"LazyGitFilterCurrentFile",
},
dependencies = {
"nvim-lua/plenary.nvim",
},
keys = {
{ "<leader>lg", "<cmd>LazyGit<cr>", desc = "Open lazygit" }
}
}
@@ -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 = {
{
"<leader>e",
function ()
require("neo-tree.command").execute({ toggle = true })
end,
desc = "Open neo-tree"
},
}
}
@@ -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 = {
{ "-", "<cmd>Oil<cr>", desc = "Open Oil" }
}
}
@@ -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,
}
},
},
}
@@ -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 = {
{ "<F6>", function() require("neotest").run.run({strategy = "dap"}) end, desc = "Run tests" },
}
}
}
@@ -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,
}
@@ -0,0 +1,4 @@
return {
"nsidorenco/neotest-vstest",
dependencies = { "nvim-neotest/neotest" },
}
@@ -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 = {
{ "<leader>nn", "<cmd>NuGet<cr>", desc = "Open NuGet" }
}
}
}
@@ -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 = '<M-x>',
select_signature_key = '<M-s>',
},
keys = {
{ mode = { 'n' }, "<leader>k", function() vim.lsp.buf.signature_help() end, desc = "Toggle signature help" },
},
}
@@ -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",
},
}
}
}
@@ -0,0 +1,6 @@
return {
"seblyng/roslyn.nvim",
---@module 'roslyn.config'
---@type RoslynNvimConfig
opts = {},
}
@@ -0,0 +1,6 @@
return {
"akinsho/bufferline.nvim",
version = "*",
dependencies = "nvim-tree/nvim-web-devicons",
opts = {}
}
@@ -0,0 +1,5 @@
return {
"catgoose/nvim-colorizer.lua",
event = "BufReadPre",
opts = {},
}
@@ -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 = {
{ "<leader>h", function() require("mini.diff").toggle_overlay() end, desc = "Toggle hunks view" },
},
}
@@ -0,0 +1,8 @@
return {
"nvim-mini/mini.notify",
version = "*",
opts = {},
keys = {
{ "<ESC>", function() require("mini.notify").clear() end, desc = "Clear notification popup" },
}
}
@@ -0,0 +1,7 @@
return {
"NStefan002/screenkey.nvim",
enabled = true,
lazy = false,
version = "*",
}
@@ -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" }
},
},
}
@@ -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 = {},
},
}
@@ -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,
}
@@ -0,0 +1,16 @@
return {
"folke/which-key.nvim",
event = "VeryLazy",
opts = {
preset = "helix",
},
keys = {
{
"<leader>?",
function()
require("which-key").show({ global = false })
end,
desc = "Buffer Local Keymaps (which-key)",
},
},
}