mirror of
https://github.com/mqttr/dotfiles.git
synced 2025-12-15 04:25:50 -06:00
feat(nvim): add emmet-ls plugin for html
This commit is contained in:
@@ -3,23 +3,25 @@
|
||||
"LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" },
|
||||
"barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" },
|
||||
"blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" },
|
||||
"emmet": { "branch": "main", "commit": "bff967b1d91948a88104987b427842deb78bacf5" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "20ad4419564d6e22b189f6738116b38871082332" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "5813e4878748805f1518cee7abb50fd7205a3a48" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
|
||||
"markview.nvim": { "branch": "main", "commit": "8e6a30b728374eb244761a8027306f96c58eef8f" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "b1d9a914b02ba5660f1e272a03314b31d4576fe2" },
|
||||
"markview.nvim": { "branch": "main", "commit": "bf62f7d173f4b42cd02794c6c5f5a8bd3047a58a" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "7d527c76c43f46294de9c19d39c5a86317809b4b" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
|
||||
"mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" },
|
||||
"mini.icons": { "branch": "main", "commit": "ff2e4f1d29f659cc2bad0f9256f2f6195c6b2428" },
|
||||
"mini.nvim": { "branch": "main", "commit": "dce9bc4e19d02d5c37fe71c16f40f8a5536b0386" },
|
||||
"mini.nvim": { "branch": "main", "commit": "c007f4b3822c99b98328bc214589a721c69d1514" },
|
||||
"neo-tree.nvim": { "branch": "main", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim": { "branch": "main", "commit": "da33755d00e09bff2473978910168ff9ea5dc453" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "c6f05c0900144f027a8a0332566878e398d457b5" },
|
||||
"nvim": { "branch": "main", "commit": "ce4a8e0d5267e67056f9f4dcf6cb1d0933c8ca00" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "effe4bf2e1afb881ea67291c648b68dd3dfc927a" },
|
||||
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||
|
||||
42
nvim/lua/plugins/emmet.lua
Normal file
42
nvim/lua/plugins/emmet.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
return {
|
||||
'pedro757/emmet',
|
||||
config = function ()
|
||||
local lspconfig = require'lspconfig'
|
||||
local configs = require'lspconfig.configs'
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
|
||||
if not configs.ls_emmet then
|
||||
configs.ls_emmet = {
|
||||
default_config = {
|
||||
cmd = { 'emmet-ls', '--stdio' };
|
||||
filetypes = {
|
||||
'html',
|
||||
'css',
|
||||
'scss',
|
||||
'javascriptreact',
|
||||
'typescriptreact',
|
||||
'haml',
|
||||
'xml',
|
||||
'xsl',
|
||||
'pug',
|
||||
'slim',
|
||||
'sass',
|
||||
'stylus',
|
||||
'less',
|
||||
'sss',
|
||||
'hbs',
|
||||
'handlebars',
|
||||
};
|
||||
root_dir = function(fname)
|
||||
return vim.loop.cwd()
|
||||
end;
|
||||
settings = {};
|
||||
};
|
||||
}
|
||||
end
|
||||
lspconfig.ls_emmet.setup { capabilities = capabilities }
|
||||
end
|
||||
}
|
||||
|
||||
21
nvim/lua/plugins/html.lua
Normal file
21
nvim/lua/plugins/html.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
return {
|
||||
'windwp/nvim-ts-autotag',
|
||||
config = function()
|
||||
require('nvim-ts-autotag').setup({
|
||||
opts = {
|
||||
-- Defaults
|
||||
enable_close = true, -- Auto close tags
|
||||
enable_rename = true, -- Auto rename pairs of tags
|
||||
enable_close_on_slash = true -- Auto close on trailing </
|
||||
},
|
||||
-- Also override individual filetype configs, these take priority.
|
||||
-- Empty by default, useful if one of the "opts" global settings
|
||||
-- doesn't work well in a specific filetype
|
||||
per_filetype = {
|
||||
["html"] = {
|
||||
enable_close = false
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
}
|
||||
@@ -175,6 +175,7 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
emmet_ls = {},
|
||||
}
|
||||
|
||||
-- Ensure the servers and tools above are installed
|
||||
@@ -190,14 +191,14 @@ return {
|
||||
--
|
||||
-- You can add other tools here that you want Mason to install
|
||||
-- for you, so that they are available from within Neovim.
|
||||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
local ensure_installed = vim.tbl_keys(servers)
|
||||
vim.list_extend(ensure_installed, {
|
||||
'stylua', -- Used to format Lua code
|
||||
})
|
||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||
|
||||
require('mason-lspconfig').setup {
|
||||
ensure_installed = {},
|
||||
ensure_installed = ensure_installed,
|
||||
automatic_installation = false,
|
||||
handlers = {
|
||||
function(server_name)
|
||||
|
||||
Reference in New Issue
Block a user