Skip to content

Commit

Permalink
use ruff, eliminate null-ls for python
Browse files Browse the repository at this point in the history
  • Loading branch information
emattiza committed Nov 17, 2023
1 parent 27d04a8 commit 478ee6c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions modules/lsp/lsp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,6 @@ in {
command = "${pkgs.shellcheck}/bin/shellcheck",
}),
''}
${writeIf cfg.python
''
null_ls.builtins.formatting.black.with({
command = "${pkgs.black}/bin/black",
}),
''}
-- Commented out for now
--${writeIf (config.vim.git.enable && config.vim.git.gitsigns.enable) ''
-- null_ls.builtins.code_actions.gitsigns,
Expand Down Expand Up @@ -364,6 +358,15 @@ in {
on_attach= default_nofmt_on_attach;
cmd = {"${pkgs.nodePackages.pyright}/bin/pyright-langserver", "--stdio"}
}
-- Ruff config
lspconfig.ruff_lsp.setup {
capabilities = capabilities;
on_attach = function(client, bufnr)
attach_keymaps(client, bufnr)
simple_format_callback(client, bufnr)
end;
cmd = {"${pkgs.python3Packages.ruff-lsp}/bin/ruff-lsp"}
}
''}
${writeIf cfg.nix ''
Expand Down

0 comments on commit 478ee6c

Please sign in to comment.