feat(neovim): add python lsp, lint and formatting
This commit is contained in:
parent
3015e9d45b
commit
935be8d906
|
@ -76,6 +76,11 @@ in
|
||||||
nixd
|
nixd
|
||||||
nixfmt-rfc-style
|
nixfmt-rfc-style
|
||||||
|
|
||||||
|
# Python
|
||||||
|
basedpyright
|
||||||
|
python312Packages.flake8
|
||||||
|
ruff
|
||||||
|
|
||||||
# TypeScript
|
# TypeScript
|
||||||
typescript-language-server
|
typescript-language-server
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
---@type LazySpec
|
---@type LazySpec
|
||||||
return {
|
return {
|
||||||
"nvimtools/none-ls.nvim",
|
"nvimtools/none-ls.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvimtools/none-ls-extras.nvim",
|
||||||
|
},
|
||||||
opts = function(_, config)
|
opts = function(_, config)
|
||||||
-- config variable is the default configuration table for the setup function call
|
-- config variable is the default configuration table for the setup function call
|
||||||
local null_ls = require("null-ls")
|
local null_ls = require("null-ls")
|
||||||
|
@ -12,9 +15,11 @@ return {
|
||||||
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
|
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
|
||||||
config.sources = {
|
config.sources = {
|
||||||
-- Set a formatter
|
-- Set a formatter
|
||||||
|
require("none-ls.diagnostics.flake8"),
|
||||||
null_ls.builtins.formatting.clang_format,
|
null_ls.builtins.formatting.clang_format,
|
||||||
null_ls.builtins.formatting.nixfmt,
|
null_ls.builtins.formatting.nixfmt,
|
||||||
null_ls.builtins.formatting.prettier,
|
null_ls.builtins.formatting.prettier,
|
||||||
|
require("none-ls.formatting.ruff"),
|
||||||
null_ls.builtins.formatting.stylua,
|
null_ls.builtins.formatting.stylua,
|
||||||
}
|
}
|
||||||
return config -- return final config table
|
return config -- return final config table
|
||||||
|
|
Loading…
Reference in a new issue