File tree 3 files changed +34
-3
lines changed
3 files changed +34
-3
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ local nvim_lsp = require("lspconfig")
3
3
-- Use an on_attach function to only map the following keys
4
4
-- after the language server attaches to the current buffer
5
5
local on_attach = function (client , bufnr )
6
+ if client .name == " ruff_lsp" then
7
+ -- Disable hover in favor of pyright
8
+ client .server_capabilities .hoverProvider = false
9
+ end
6
10
local opts = {noremap = true , silent = true }
7
11
vim .api .nvim_buf_set_option (bufnr , " omnifunc" , " v:lua.vim.lsp.omnifunc" )
8
12
14
18
-- Use a loop to conveniently call 'setup' on multiple servers and
15
19
-- map buffer local keybindings when the language server attaches'cssls'
16
20
local servers = {
17
- " pyright " ,
21
+ " ruff_lsp " ,
18
22
" rust_analyzer" ,
19
23
" bashls" ,
20
24
" vimls" ,
@@ -25,6 +29,25 @@ local servers = {
25
29
" cssls"
26
30
}
27
31
32
+ nvim_lsp .pyright .setup {
33
+ on_attach = on_attach ,
34
+ flags = {
35
+ debounce_text_changes = 150
36
+ },
37
+ settings = {
38
+ pyright = {
39
+ -- Using Ruff's import organizer
40
+ disableOrganizeImports = true
41
+ },
42
+ python = {
43
+ analysis = {
44
+ -- Ignore all files for analysis to exclusively use Ruff for linting
45
+ ignore = {" *" }
46
+ }
47
+ }
48
+ }
49
+ }
50
+
28
51
for _ , lsp in ipairs (servers ) do
29
52
nvim_lsp [lsp ].setup {
30
53
on_attach = on_attach ,
Original file line number Diff line number Diff line change @@ -18,8 +18,7 @@ return {
18
18
-- Configuration for psf/black
19
19
function ()
20
20
return {
21
- exe = " yapf" , -- this should be available on your $PATH
22
- stdin = true
21
+ exe = " ruff format" , -- this should be available on your $PATH
23
22
}
24
23
end
25
24
},
Original file line number Diff line number Diff line change @@ -123,3 +123,12 @@ snippet beg
123
123
\b egin{$1 }
124
124
$2
125
125
\e nd{$1 }
126
+
127
+ snippet mbf
128
+ \m athbf{$1 }
129
+
130
+ snippet ita
131
+ \t extit{$1 }
132
+
133
+ snippet tbf
134
+ \t extbf{$1 }
You can’t perform that action at this time.
0 commit comments