Skip to content

Commit f6ee074

Browse files
feat: update language servers
1 parent 6fd91c4 commit f6ee074

4 files changed

Lines changed: 61 additions & 50 deletions

File tree

flake.lock

Lines changed: 42 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
nil
4545
alejandra
4646

47-
(python3.withPackages (ps: with ps; [python-lsp-server python-lsp-ruff]))
47+
basedpyright
4848
ruff
4949

5050
rust-analyzer

lua/languages/lua.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
-- TODO: Consider switching to emmylua-analyzer-rust
2+
13
local lsp = {
24
settings = {
35
Lua = {
46
format = { enable = false },
57
hint = { enable = true },
68
codeLens = { enable = true },
79
telemetry = { enable = false },
8-
completion = { callSnippet = "Both" },
910
},
1011
},
1112
}

lua/languages/python.lua

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
1-
-- TODO: Switch to basedpyright?
2-
31
local lsp = {
42
settings = {
5-
pylsp = {
6-
plugins = {
7-
ruff = { enabled = true },
3+
basedpyright = {
4+
analysis = {
5+
typeCheckingMode = "standard",
86
},
97
},
108
},
119
}
1210

11+
local formatter = { "ruff_fix", "ruff_format", "ruff_organize_imports" }
12+
1313
return {
1414
{
1515
"neovim/nvim-lspconfig",
1616
optional = true,
1717
opts = {
1818
servers = {
19-
pylsp = lsp,
19+
basedpyright = lsp,
20+
},
21+
},
22+
},
23+
24+
{
25+
"stevearc/conform.nvim",
26+
optional = true,
27+
opts = {
28+
formatters_by_ft = {
29+
python = formatter,
2030
},
2131
},
2232
},

0 commit comments

Comments
 (0)