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