mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[nvim] Add HTML lspconfig
This commit is contained in:
parent
a7d2efc750
commit
444dc81d1b
1 changed files with 34 additions and 0 deletions
34
nvim/dotfiles/lspconfigs/html.lua
Normal file
34
nvim/dotfiles/lspconfigs/html.lua
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
local utils = require('kdotfiles.utils')
|
||||||
|
local lspconfig = require('lspconfig')
|
||||||
|
|
||||||
|
local file = '/etc/os-release'
|
||||||
|
local lines = utils.lines_from(file)
|
||||||
|
local os_name = utils.get_os(lines)
|
||||||
|
|
||||||
|
local cmd = (os_name == 'arch') and {'vscode-html-languageserver'} or {'vscode-html-language-server'}
|
||||||
|
vim.list_extend(cmd, {'--stdio'})
|
||||||
|
|
||||||
|
lspconfig['html'].setup({
|
||||||
|
cmd = cmd;
|
||||||
|
filetypes = {'html', 'handlebars', 'htmldjango', 'blade'};
|
||||||
|
completion_menu_label = 'HTML';
|
||||||
|
|
||||||
|
settings_scopes = {'html', 'css', 'javascript'};
|
||||||
|
settings = {
|
||||||
|
html = {
|
||||||
|
format = {
|
||||||
|
enable = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
javascript = {
|
||||||
|
format = {
|
||||||
|
enable = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
css = {
|
||||||
|
format = {
|
||||||
|
enable = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
Loading…
Reference in a new issue