feat(ide): emmet language server and intergration

This commit is contained in:
Guz
2024-12-07 17:20:51 -03:00
parent b464bf03d6
commit fad582d4fe
2 changed files with 60 additions and 1 deletions

View File

@@ -1,5 +1,40 @@
local lsps = {
["cssls"] = nil,
["emmet_language_server"] = {
filetypes = {
"css",
"eruby",
"html",
"javascript",
"javascriptreact",
"less",
"sass",
"scss",
"pug",
"templ",
"typescriptreact",
},
init_options = {
---@type table<string, string>
includeLanguages = {},
--- @type string[]
excludeLanguages = {},
--- @type string[]
extensionsPath = {},
--- @type table<string, any> [Emmet Docs](https://docs.emmet.io/customization/preferences/)
preferences = {},
--- @type boolean Defaults to `true`
showAbbreviationSuggestions = true,
--- @type "always" | "never" Defaults to `"always"`
showExpandedAbbreviation = "always",
--- @type boolean Defaults to `false`
showSuggestionsAsSnippets = false,
--- @type table<string, any> [Emmet Docs](https://docs.emmet.io/customization/syntax-profiles/)
syntaxProfiles = {},
--- @type table<string, string> [Emmet Docs](https://docs.emmet.io/customization/snippets/#variables)
variables = {},
},
},
["eslint"] = nil,
["denols"] = nil,
["lua_ls"] = {
@@ -53,4 +88,18 @@ return {
end
end,
},
-- Emmet integration
{
"nvim-emmet",
ft = lsps["emmet_language_server"].filetypes,
keys = {
{
"<leader>we",
":lua require('nvim-emmet').wrap_with_abbreviation()<cr>",
desc = "[Emmet] Wrap with emmet abbreviation",
mode = { "n", "v" },
},
},
},
}

View File

@@ -9,6 +9,7 @@
startPlugins = with pkgs;
with vimPlugins; [
blink-cmp
catppuccin-nvim
indent-blankline-nvim
lze
@@ -27,7 +28,6 @@
with pkgs.vimPlugins; [
auto-save-nvim
auto-session
blink-cmp
cloak-nvim
conform-nvim
comment-nvim
@@ -45,9 +45,19 @@
telescope-nvim
telescope-fzf-native-nvim
tmux-nvim
(vimUtils.buildVimPlugin {
pname = "nvim-emmet";
version = "v0.4.4";
src = fetchGit {
url = "https://github.com/olrtg/nvim-emmet";
rev = "cde4fb2968704aae5c18b7f8a9bc2508767bb78d";
};
})
];
languageServers = with pkgs; [
emmet-language-server
deno
gopls
htmx-lsp