Add linter support, isort for formatters and use jedi instead of basedpyright
This commit is contained in:
@@ -4,7 +4,7 @@ return {
|
||||
require("conform").setup {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
python = { "black" }
|
||||
python = { "isort", "black", lsp_format = "fallback" }
|
||||
},
|
||||
format_on_save = {
|
||||
timeout_ms = 500,
|
||||
|
||||
17
lua/plugins/linter.lua
Normal file
17
lua/plugins/linter.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
return {
|
||||
'mfussenegger/nvim-lint',
|
||||
config = function()
|
||||
local lint = require("lint")
|
||||
lint.linters_by_ft = {
|
||||
python = { 'dmypy' }
|
||||
}
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "TextChanged", "InsertLeave" }, {
|
||||
callback = function()
|
||||
-- try_lint without arguments runs the linters defined in `linters_by_ft`
|
||||
-- for the current filetype
|
||||
require("lint").try_lint()
|
||||
end,
|
||||
})
|
||||
end
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
vim.lsp.enable({ "lua_ls", "basedpyright", "gopls", "html", "yamlls", "svelte-language-server", "clangd", "ansiblels" })
|
||||
vim.lsp.enable({ "lua_ls", "jedi_language_server", "gopls", "html", "yamlls", "svelte-language-server", "clangd",
|
||||
"ansiblels" })
|
||||
end
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
return {
|
||||
{
|
||||
'abecodes/tabout.nvim',
|
||||
lazy = false,
|
||||
config = function()
|
||||
require('tabout').setup {
|
||||
tabkey = '<Tab>'
|
||||
}
|
||||
end
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user