neovim: add eslint in none-ls config
This commit is contained in:
@@ -20,6 +20,7 @@ null_ls.setup({
|
|||||||
null_formatting.gofmt,
|
null_formatting.gofmt,
|
||||||
null_formatting.goimports,
|
null_formatting.goimports,
|
||||||
null_formatting.shfmt,
|
null_formatting.shfmt,
|
||||||
|
require("none-ls.diagnostics.eslint"),
|
||||||
},
|
},
|
||||||
on_attach = function()
|
on_attach = function()
|
||||||
local group = vim.api.nvim_create_augroup("NullLsLspFormatting", { clear = true })
|
local group = vim.api.nvim_create_augroup("NullLsLspFormatting", { clear = true })
|
||||||
|
|||||||
@@ -119,26 +119,3 @@ vim.lsp.config.emmet_ls = {
|
|||||||
root_markers = { "package.json", ".git", vim.uv.cwd() },
|
root_markers = { "package.json", ".git", vim.uv.cwd() },
|
||||||
}
|
}
|
||||||
vim.lsp.enable("emmet_ls")
|
vim.lsp.enable("emmet_ls")
|
||||||
|
|
||||||
-- eslint
|
|
||||||
vim.lsp.config.eslint_ls = {
|
|
||||||
cmd = { "vscode-eslint-language-server", "--stdio" },
|
|
||||||
filetypes = {
|
|
||||||
"javascript",
|
|
||||||
"javascript.jsx",
|
|
||||||
"javascriptreact",
|
|
||||||
"typescript",
|
|
||||||
"typescript.tsx",
|
|
||||||
"typescriptreact",
|
|
||||||
},
|
|
||||||
root_markers = {
|
|
||||||
".eslintrc.json",
|
|
||||||
"eslint.config.js",
|
|
||||||
"eslint.config.mjs",
|
|
||||||
"eslint.config.cjs",
|
|
||||||
"eslint.config.ts",
|
|
||||||
"eslint.config.mts",
|
|
||||||
"eslint.config.cts",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
-- vim.lsp.enable("eslint_ls")
|
|
||||||
|
|||||||
@@ -57,7 +57,9 @@ require("lazy").setup({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "nvimtools/none-ls.nvim" },
|
{ "nvimtools/none-ls.nvim", dependencies = {
|
||||||
|
"nvimtools/none-ls-extras.nvim",
|
||||||
|
} },
|
||||||
|
|
||||||
{
|
{
|
||||||
"kyazdani42/nvim-tree.lua",
|
"kyazdani42/nvim-tree.lua",
|
||||||
@@ -74,5 +76,13 @@ require("lazy").setup({
|
|||||||
{ "nvim-lualine/lualine.nvim" },
|
{ "nvim-lualine/lualine.nvim" },
|
||||||
|
|
||||||
{ "b0o/SchemaStore.nvim" },
|
{ "b0o/SchemaStore.nvim" },
|
||||||
|
|
||||||
|
{ "nvzone/floaterm", dependencies = { "nvzone/volt" }, opts = {}, cmd = "FloatermToggle" },
|
||||||
|
|
||||||
|
{ "SyedAsimShah1/quick-todo.nvim", opts = {
|
||||||
|
keys = {
|
||||||
|
open = "<leader>t",
|
||||||
|
},
|
||||||
|
} },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user