This commit is contained in:
2026-04-28 11:49:00 +03:00
parent 46ad0970a2
commit 479c3bebdb
4 changed files with 63 additions and 18 deletions
+8 -1
View File
@@ -29,7 +29,14 @@ require("lazy").setup({
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
install = { colorscheme = { "habamax" } },
install = { colorscheme = { "habamax" }, missing = true },
-- automatically check for plugin updates
checker = { enabled = true },
})
-- Auto sync plugins on startup
vim.api.nvim_create_autocmd("VimEnter", {
callback = function()
vim.cmd("Lazy sync")
end,
})
+2
View File
@@ -28,6 +28,8 @@ return {
"julia",
"python",
"zig",
"asm",
"html-lsp",
},
})
end,
+38 -2
View File
@@ -10,7 +10,7 @@ return {
dependencies = { "williamboman/mason.nvim" },
opts = {
-- installs these via Mason (so you don't have to)
ensure_installed = { "gopls", "ts_ls", "lua_ls", "clangd", "rust_analyzer", "omnisharp", "jdtls", "julials", "pyright", "zls" },
ensure_installed = { "gopls", "ts_ls", "lua_ls", "clangd", "rust_analyzer", "omnisharp", "jdtls", "julials", "pyright", "ruff", "zls", "asm_lsp" },
-- optional: automatically call vim.lsp.enable() for installed servers
automatic_enable = true,
@@ -22,6 +22,16 @@ return {
"neovim/nvim-lspconfig",
dependencies = { "mason-org/mason-lspconfig.nvim" },
config = function()
-- Disable hover for ruff (Pyright provides better documentation)
vim.api.nvim_create_autocmd("LspAttach", {
callback = function(args)
local client = vim.lsp.get_client_by_id(args.data.client_id)
if client and client.name == "ruff" then
client.server_capabilities.hoverProvider = false
end
end,
})
-- LSP keymaps when a server attaches
vim.api.nvim_create_autocmd("LspAttach", {
callback = function(args)
@@ -34,6 +44,7 @@ return {
map("n", "K", vim.lsp.buf.hover, "Hover")
map("n", "<leader>rn", vim.lsp.buf.rename, "Rename")
map("n", "<leader>ca", vim.lsp.buf.code_action, "Code action")
map("i", "<C-k>", vim.lsp.buf.signature_help, "Signature help")
end,
})
@@ -99,6 +110,27 @@ return {
vim.lsp.config("pyright", {
capabilities = capabilities,
settings = {
python = {
analysis = {
typeCheckingMode = "standard",
autoSearchPaths = true,
useLibraryCodeForTypes = true,
diagnosticMode = "workspace",
},
},
},
})
vim.lsp.config("ruff", {
capabilities = capabilities,
init_options = {
settings = {
lint = {
ignore = { "E701", "E702", "E703" },
},
},
},
})
vim.lsp.config("zls", {
@@ -111,6 +143,10 @@ return {
},
},
})
vim.lsp.config("asm_lsp", {
capabilities = capabilities,
})
end,
},
@@ -236,7 +272,7 @@ return {
rust = { "rustfmt" },
cs = { "csharpier" },
java = { "google-java-format" },
python = { "black" },
python = { "ruff_fix" },
zig = { "zigfmt" },
},
})