mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-23 01:05:38 +00:00
add flake8 and improve nvim-tree
This commit is contained in:
parent
f745a24462
commit
c42b0b20be
@ -14,9 +14,8 @@ M.packer = function(use)
|
|||||||
return vim.fn.executable(program) == 1
|
return vim.fn.executable(program) == 1
|
||||||
end
|
end
|
||||||
|
|
||||||
local capabilities = require("cmp_nvim_lsp").update_capabilities(
|
local capabilities =
|
||||||
vim.lsp.protocol.make_client_capabilities()
|
require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
)
|
|
||||||
if on_path("lua-language-server") then
|
if on_path("lua-language-server") then
|
||||||
require("lspconfig").sumneko_lua.setup({
|
require("lspconfig").sumneko_lua.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
@ -93,6 +92,11 @@ M.packer = function(use)
|
|||||||
return on_path("black")
|
return on_path("black")
|
||||||
end,
|
end,
|
||||||
}),
|
}),
|
||||||
|
require("null-ls").builtins.diagnostics.flake8.with({
|
||||||
|
condition = function()
|
||||||
|
return on_path("flake8")
|
||||||
|
end,
|
||||||
|
}),
|
||||||
require("null-ls").builtins.formatting.fish_indent.with({
|
require("null-ls").builtins.formatting.fish_indent.with({
|
||||||
condition = function()
|
condition = function()
|
||||||
return on_path("fish_indent")
|
return on_path("fish_indent")
|
||||||
|
@ -71,6 +71,11 @@ M.packer = function(use)
|
|||||||
require("nvim-tree").setup({
|
require("nvim-tree").setup({
|
||||||
disable_netrw = true,
|
disable_netrw = true,
|
||||||
hijack_netrw = true,
|
hijack_netrw = true,
|
||||||
|
update_focused_file = {
|
||||||
|
enable = true,
|
||||||
|
update_cwd = true,
|
||||||
|
ignore_list = {},
|
||||||
|
},
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
enable = true,
|
enable = true,
|
||||||
icons = {
|
icons = {
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
# python310 # Standard Python interpreter
|
# python310 # Standard Python interpreter
|
||||||
nodePackages.pyright # Python language server
|
nodePackages.pyright # Python language server
|
||||||
black # Python formatter
|
black # Python formatter
|
||||||
|
python310Packages.flake8 # Python linter
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.fish.shellAbbrs = { py = "python3"; };
|
programs.fish.shellAbbrs = { py = "python3"; };
|
||||||
|
Loading…
Reference in New Issue
Block a user