trying to get cube off the ground again

This commit is contained in:
Anish Lakhwara
2022-12-07 15:52:37 +10:00
parent 6019c6a30f
commit a242b28158
6 changed files with 58 additions and 72 deletions
+31 -41
View File
@@ -143,10 +143,9 @@ let
tasklib
pynvim
six
python-lsp-server
python-lsp-black
pylsp-mypy
black
isort
# other python packages you want
];
python-with-my-packages = pkgs.python3.withPackages my-python-packages;
@@ -539,23 +538,15 @@ in
-- null-ls
local null_ls = require "null-ls"
local pyright = {
cmd = { "pyright" },
filetypes = { "python", },
debounce = 250,
debug = false,
default_timeout = 5000,
args = { "-p", "$FILENAME", "--skipunannotated" }
}
local sources = {
pyright,
null_ls.builtins.code_actions.statix,
null_ls.builtins.diagnostics.shellcheck,
-- null_ls.builtins.diagnostics.clj_kondo,
-- null_ls.builtins.formatting.black,
null_ls.builtins.formatting.isort,
null_ls.builtins.formatting.black,
null_ls.builtins.code_actions.proselint,
-- null_ls.builtins.diagnostics.mypy,
}
null_ls.setup({sources})
-- Setup lspconfig
require("lsp-format").setup {}
@@ -567,7 +558,7 @@ in
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
local lspconfig = require('lspconfig')
local servers = { 'clojure_lsp', 'terraform_lsp', 'zls' }
local servers = { 'clojure_lsp', 'terraform_lsp', 'zls', 'pyright', 'rust_analyzer', 'tsserver' }
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
on_attach = function(client, bufnr)
@@ -584,29 +575,30 @@ in
end,
capabilities = capabilities,
}
require('lspconfig').pylsp.setup {
on_attach = function(client, bufnr)
format.on_attach(client)
navic.attach(client, bufnr)
end,
capabilities = capabilities,
settings = {
pylsp = {
configurationSources = { "flake8", "mypy", "black" },
plugins = {
black = {enabled = true},
jedi_signature_help = {enabled = true},
jedi_completion = { include_params = true },
pylsp_mypy={ enabled = true },
pycodestyle={
enabled=true,
ignore={'E501', 'E231'},
maxLineLength=120,
},
},
},
},
}
-- deprecated pylsp
-- require('lspconfig').pylsp.setup {
-- on_attach = function(client, bufnr)
-- format.on_attach(client)
-- navic.attach(client, bufnr)
-- end,
-- capabilities = capabilities,
-- settings = {
-- pylsp = {
-- configurationSources = { "flake8", "mypy", "black" },
-- plugins = {
-- black = {enabled = true},
-- jedi_signature_help = {enabled = true},
-- jedi_completion = { include_params = true },
-- pylsp_mypy={ enabled = true },
-- pycodestyle={
-- enabled=true,
-- ignore={'E501', 'E231'},
-- maxLineLength=120,
-- },
-- },
-- },
-- },
-- }
require('gitsigns').setup { sign_priority=80 }
@@ -738,16 +730,14 @@ in
clojure-lsp
rnix-lsp
terraform-lsp
rust-analyzer
clj-kondo
zls
gcc
nodePackages.pyright
nodePackages_latest.pyright
shellcheck
proselint
statix
# installs different langauge servers for neovim-lsp
# have a look on the link below to figure out the ones for your languages
# https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md
nodePackages.typescript
nodePackages.typescript-language-server
];