Skip to content

Commit 3ae082d

Browse files
committed
refactor: LSP
1 parent af9390f commit 3ae082d

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

home-manager/common/neovim/lua/plugins/astrolsp.lua

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
2-
31
-- AstroLSP allows you to customize the features in AstroNvim's LSP configuration engine
42
-- Configuration documentation can be found with `:h astrolsp`
53
-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`)
@@ -12,16 +10,16 @@ return {
1210
opts = {
1311
-- Configuration table of features provided by AstroLSP
1412
features = {
15-
autoformat = true, -- enable or disable auto formatting on start
16-
codelens = true, -- enable/disable codelens refresh on start
17-
inlay_hints = false, -- enable/disable inlay hints on start
13+
autoformat = true, -- enable or disable auto formatting on start
14+
codelens = true, -- enable/disable codelens refresh on start
15+
inlay_hints = false, -- enable/disable inlay hints on start
1816
semantic_tokens = true, -- enable/disable semantic token highlighting
1917
},
2018
-- customize lsp formatting options
2119
formatting = {
2220
-- control auto formatting on save
2321
format_on_save = {
24-
enabled = true, -- enable or disable format on save globally
22+
enabled = true, -- enable or disable format on save globally
2523
allow_filetypes = { -- enable format on save for specified filetypes only
2624
-- "go",
2725
},
@@ -40,12 +38,28 @@ return {
4038
},
4139
-- enable servers that you already have installed without mason
4240
servers = {
43-
-- "pyright"
41+
"docker_compose_language_service",
42+
"dockerls",
43+
"eslint",
44+
"jsonls",
45+
"lua_ls",
46+
"marksman",
47+
"nil_ls",
48+
"pyright",
49+
"ruff",
50+
"rust_analyzer",
51+
"taplo",
52+
"tsserver",
53+
"volar",
4454
},
4555
-- customize language server configuration options passed to `lspconfig`
4656
---@diagnostic disable: missing-fields
4757
config = {
48-
-- clangd = { capabilities = { offsetEncoding = "utf-8" } },
58+
nil_ls = {
59+
formatting = {
60+
command = { "nixpkgs-fmt" },
61+
},
62+
},
4963
},
5064
-- customize how language servers are attached
5165
handlers = {

0 commit comments

Comments
 (0)