autopep8
This commit is contained in:
parent
a58d02d1bd
commit
b1981a2dcc
@ -43,7 +43,7 @@ in
|
|||||||
android-tools
|
android-tools
|
||||||
imagemagick
|
imagemagick
|
||||||
mosh
|
mosh
|
||||||
python311
|
python312
|
||||||
texliveSmall # Pandoc PDF Dep
|
texliveSmall # Pandoc PDF Dep
|
||||||
google-cloud-sdk
|
google-cloud-sdk
|
||||||
tldr
|
tldr
|
||||||
|
@ -184,9 +184,9 @@ nvim_lsp.golangci_lint_ls.setup({
|
|||||||
})
|
})
|
||||||
|
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
--------------------- Null-LS LSP --------------------
|
--------------------- None-LS LSP --------------------
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
local null_ls = require("null-ls")
|
local none_ls = require("null-ls")
|
||||||
|
|
||||||
local eslintFiles = {
|
local eslintFiles = {
|
||||||
".eslintrc",
|
".eslintrc",
|
||||||
@ -203,26 +203,27 @@ local eslintFiles = {
|
|||||||
"eslint.config.cts",
|
"eslint.config.cts",
|
||||||
}
|
}
|
||||||
|
|
||||||
has_eslint_in_parents = function(fname)
|
local has_eslint_in_parents = function(fname)
|
||||||
root_file = nvim_lsp.util.insert_package_json(eslintFiles, "eslintConfig", fname)
|
local root_file = nvim_lsp.util.insert_package_json(eslintFiles, "eslintConfig", fname)
|
||||||
return nvim_lsp.util.root_pattern(unpack(root_file))(fname)
|
return nvim_lsp.util.root_pattern(unpack(root_file))(fname)
|
||||||
end
|
end
|
||||||
|
|
||||||
null_ls.setup({
|
none_ls.setup({
|
||||||
sources = {
|
sources = {
|
||||||
-- Prettier Formatting
|
-- Prettier Formatting
|
||||||
null_ls.builtins.formatting.prettier,
|
none_ls.builtins.formatting.prettier,
|
||||||
null_ls.builtins.formatting.prettier.with({ filetypes = { "template" } }),
|
none_ls.builtins.formatting.prettier.with({ filetypes = { "template" } }),
|
||||||
require("none-ls.diagnostics.eslint_d").with({
|
require("none-ls.diagnostics.eslint_d").with({
|
||||||
condition = function(utils)
|
condition = function(utils)
|
||||||
return has_eslint_in_parents(vim.fn.getcwd())
|
return has_eslint_in_parents(vim.fn.getcwd())
|
||||||
end,
|
end,
|
||||||
}),
|
}),
|
||||||
null_ls.builtins.completion.spell,
|
none_ls.builtins.completion.spell,
|
||||||
null_ls.builtins.formatting.nixpkgs_fmt,
|
none_ls.builtins.formatting.nixpkgs_fmt,
|
||||||
null_ls.builtins.formatting.stylua,
|
none_ls.builtins.formatting.stylua,
|
||||||
null_ls.builtins.diagnostics.sqlfluff,
|
none_ls.builtins.diagnostics.sqlfluff,
|
||||||
null_ls.builtins.formatting.sqlfluff,
|
none_ls.builtins.formatting.sqlfluff,
|
||||||
|
require("none-ls.formatting.autopep8").with({ filetypes = { "starlark", "python" } }),
|
||||||
},
|
},
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
if client.supports_method("textDocument/formatting") then
|
if client.supports_method("textDocument/formatting") then
|
||||||
|
@ -82,12 +82,12 @@ in
|
|||||||
(
|
(
|
||||||
pkgs.vimUtils.buildVimPlugin {
|
pkgs.vimUtils.buildVimPlugin {
|
||||||
pname = "none-ls-extras.nvim";
|
pname = "none-ls-extras.nvim";
|
||||||
version = "2024-06-11";
|
version = "2025-05-01";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "nvimtools";
|
owner = "nvimtools";
|
||||||
repo = "none-ls-extras.nvim";
|
repo = "none-ls-extras.nvim";
|
||||||
rev = "336e84b9e43c0effb735b08798ffac382920053b";
|
rev = "80dfc30b674c45ad892726f656440cc9e69b82e3";
|
||||||
sha256 = "sha256-UtU4oWSRTKdEoMz3w8Pk95sROuo3LEwxSDAm169wxwk=";
|
sha256 = "sha256-VwI3jIqSYkhMS1S1sVZbyGb9mXliBoFytkFXkks4PD0=";
|
||||||
};
|
};
|
||||||
meta.homepage = "https://github.com/nvimtools/none-ls-extras.nvim/";
|
meta.homepage = "https://github.com/nvimtools/none-ls-extras.nvim/";
|
||||||
}
|
}
|
||||||
@ -166,6 +166,7 @@ in
|
|||||||
nodePackages.vscode-langservers-extracted
|
nodePackages.vscode-langservers-extracted
|
||||||
pyright
|
pyright
|
||||||
eslint_d
|
eslint_d
|
||||||
|
python312Packages.autopep8
|
||||||
|
|
||||||
# Formatters
|
# Formatters
|
||||||
luaformatter
|
luaformatter
|
||||||
|
Loading…
x
Reference in New Issue
Block a user