add flake8 and improve nvim-tree

This commit is contained in:
Noah Masur 2022-07-18 23:34:32 -04:00
parent f745a24462
commit c42b0b20be
3 changed files with 13 additions and 3 deletions

View File

@ -14,9 +14,8 @@ M.packer = function(use)
return vim.fn.executable(program) == 1
end
local capabilities = require("cmp_nvim_lsp").update_capabilities(
vim.lsp.protocol.make_client_capabilities()
)
local capabilities =
require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities())
if on_path("lua-language-server") then
require("lspconfig").sumneko_lua.setup({
capabilities = capabilities,
@ -93,6 +92,11 @@ M.packer = function(use)
return on_path("black")
end,
}),
require("null-ls").builtins.diagnostics.flake8.with({
condition = function()
return on_path("flake8")
end,
}),
require("null-ls").builtins.formatting.fish_indent.with({
condition = function()
return on_path("fish_indent")

View File

@ -71,6 +71,11 @@ M.packer = function(use)
require("nvim-tree").setup({
disable_netrw = true,
hijack_netrw = true,
update_focused_file = {
enable = true,
update_cwd = true,
ignore_list = {},
},
diagnostics = {
enable = true,
icons = {

View File

@ -6,6 +6,7 @@
# python310 # Standard Python interpreter
nodePackages.pyright # Python language server
black # Python formatter
python310Packages.flake8 # Python linter
];
programs.fish.shellAbbrs = { py = "python3"; };