mirror of
https://github.com/tuxdotrs/tnvim.git
synced 2025-08-22 23:51:03 +05:30
feat(config): add Svelte support for syntax highlighting and LSP
This commit is contained in:
@@ -4,7 +4,7 @@ local capabilities = configs.capabilities
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
local servers = { "eslint", "gopls", "templ", "pyright", "ruff" }
|
||||
local servers = { "eslint", "gopls", "templ", "pyright", "ruff", "svelte" }
|
||||
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup({
|
||||
@@ -42,6 +42,6 @@ lspconfig.htmx.setup({
|
||||
lspconfig.tailwindcss.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
filetypes = { "templ", "astro", "javascript", "typescript", "react", "typescriptreact" },
|
||||
filetypes = { "templ", "astro", "javascript", "typescript", "react", "typescriptreact", "svelte" },
|
||||
init_options = { userLanguages = { templ = "html" } },
|
||||
})
|
||||
|
@@ -16,6 +16,7 @@ M.treesitter = {
|
||||
"javascript",
|
||||
"typescript",
|
||||
"tsx",
|
||||
"svelte",
|
||||
|
||||
-- nix
|
||||
"nix",
|
||||
@@ -48,6 +49,7 @@ M.mason = {
|
||||
"eslint-lsp",
|
||||
"eslint_d",
|
||||
"tailwindcss-language-server",
|
||||
"svelte-language-server",
|
||||
|
||||
-- nix
|
||||
"nil",
|
||||
|
Reference in New Issue
Block a user