[nvim] Switch from Mason to Chezmoi

This commit is contained in:
aloslider
2026-04-21 03:42:54 +03:00
parent e70c3138ce
commit 6c16b57f3b
19 changed files with 83 additions and 140 deletions
+6 -21
View File
@@ -5,27 +5,12 @@ require("config.keymaps")
require("config.lazy")
require("config.theme") -- ignored by git
vim.lsp.config("roslyn", require("config.lsp.roslyn"))
require("config.lsp")
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'
vim.lsp.enable({
"lua_ls",
"html",
"roslyn_ls",
})
require("config.diagnostics")
-9
View File
@@ -1,9 +0,0 @@
return {
settings = {
Lua = {
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
},
},
},
}
-54
View File
@@ -1,54 +0,0 @@
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,18 @@
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'
})
+6
View File
@@ -0,0 +1,6 @@
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
vim.lsp.config("html", {
capabilities = capabilities,
})
@@ -4,10 +4,9 @@ return {
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,
command = "netcoredbg",
args = { "--interpreter=vscode" },
}
dap.adapters.netcoredbg = netcoredbg_adapter
@@ -1,38 +0,0 @@
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,3 @@
return {
"neovim/nvim-lspconfig"
}
@@ -1,6 +0,0 @@
return {
"seblyng/roslyn.nvim",
---@module 'roslyn.config'
---@type RoslynNvimConfig
opts = {},
}