trying out null-ls
maybe have working black and mypy now??
This commit is contained in:
parent
bb54a114c2
commit
76906f1106
|
@ -59,8 +59,8 @@ let
|
||||||
pynvim
|
pynvim
|
||||||
six
|
six
|
||||||
python-lsp-server
|
python-lsp-server
|
||||||
# pylsp-mypy
|
python-lsp-black
|
||||||
pylint
|
pylsp-mypy
|
||||||
black
|
black
|
||||||
# other python packages you want
|
# other python packages you want
|
||||||
];
|
];
|
||||||
|
@ -413,6 +413,26 @@ in
|
||||||
}
|
}
|
||||||
cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = ' ' } }))
|
cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = ' ' } }))
|
||||||
|
|
||||||
|
-- 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.code_actions.proselint,
|
||||||
|
-- null_ls.builtins.diagnostics.mypy,
|
||||||
|
}
|
||||||
|
|
||||||
-- Setup lspconfig
|
-- Setup lspconfig
|
||||||
require("lsp-format").setup {}
|
require("lsp-format").setup {}
|
||||||
|
|
||||||
|
@ -421,10 +441,10 @@ in
|
||||||
require('lspconfig').rnix.setup {on_attach = require "lsp-format".on_attach}
|
require('lspconfig').rnix.setup {on_attach = require "lsp-format".on_attach}
|
||||||
require('lspconfig').pylsp.setup {on_attach = require "lsp-format".on_attach,
|
require('lspconfig').pylsp.setup {on_attach = require "lsp-format".on_attach,
|
||||||
settings = {
|
settings = {
|
||||||
formatCommand = {"black"},
|
|
||||||
pylsp = {
|
pylsp = {
|
||||||
configurationSources = { "flake8", "mypy" },
|
configurationSources = { "flake8", "mypy", "black" },
|
||||||
plugins = {
|
plugins = {
|
||||||
|
black = {enabled = true},
|
||||||
jedi_signature_help = {enabled = true},
|
jedi_signature_help = {enabled = true},
|
||||||
jedi_completion = { include_params = true },
|
jedi_completion = { include_params = true },
|
||||||
pylsp_mypy={ enabled = true },
|
pylsp_mypy={ enabled = true },
|
||||||
|
@ -475,9 +495,9 @@ in
|
||||||
}
|
}
|
||||||
|
|
||||||
-- nvim-lint
|
-- nvim-lint
|
||||||
require('lint').linters_by_ft = {
|
-- require('lint').linters_by_ft = {
|
||||||
markdown = {'vale'},
|
-- markdown = {'vale'},
|
||||||
}
|
-- }
|
||||||
|
|
||||||
-- f_term
|
-- f_term
|
||||||
local map = vim.api.nvim_set_keymap
|
local map = vim.api.nvim_set_keymap
|
||||||
|
@ -504,6 +524,10 @@ in
|
||||||
terraform-lsp
|
terraform-lsp
|
||||||
clj-kondo
|
clj-kondo
|
||||||
gcc
|
gcc
|
||||||
|
nodePackages.pyright
|
||||||
|
shellcheck
|
||||||
|
proselint
|
||||||
|
statix
|
||||||
# installs different langauge servers for neovim-lsp
|
# installs different langauge servers for neovim-lsp
|
||||||
# have a look on the link below to figure out the ones for your languages
|
# 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
|
# https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md
|
||||||
|
@ -545,7 +569,8 @@ in
|
||||||
vim-zettel
|
vim-zettel
|
||||||
|
|
||||||
# lsp stuff
|
# lsp stuff
|
||||||
nvim-lint
|
# nvim-lint
|
||||||
|
null-ls-nvim
|
||||||
nvim-lspconfig
|
nvim-lspconfig
|
||||||
nvim-cmp
|
nvim-cmp
|
||||||
cmp-nvim-lsp
|
cmp-nvim-lsp
|
||||||
|
|
Loading…
Reference in a new issue