Skip to content

Commit 4a457f5

Browse files
committed
feat(lsp): css_variables and cssls added to servers.
Signed-off-by: Guennadi Maximov C <[email protected]>
1 parent 61c1ce5 commit 4a457f5

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

lua/plugin/lsp/init.lua

+8-18
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
local User = require('user_api')
22
local Check = User.check
33
local types = User.types.lspconfig
4-
local WK = User.maps.wk
54

65
local exists = Check.exists.module
76
local executable = Check.exists.executable
8-
local empty = Check.value.empty
9-
local is_str = Check.value.is_str
107
local is_tbl = Check.value.is_tbl
11-
local is_nil = Check.value.is_nil
128
local desc = User.maps.kmap.desc
9+
local wk_avail = User.maps.wk.available
1310
local map_dict = User.maps.map_dict
1411
local hi = User.highlight.hl
1512

@@ -42,17 +39,6 @@ require('plugin.lsp.neoconf')
4239
require('plugin.lsp.trouble')
4340
require('plugin.lsp.kinds').setup()
4441

45-
--[[ local border = {
46-
{ '🭽', 'FloatBorder' },
47-
{ '▔', 'FloatBorder' },
48-
{ '🭾', 'FloatBorder' },
49-
{ '▕', 'FloatBorder' },
50-
{ '🭿', 'FloatBorder' },
51-
{ '▁', 'FloatBorder' },
52-
{ '🭼', 'FloatBorder' },
53-
{ '▏', 'FloatBorder' },
54-
} ]]
55-
5642
-- LSP settings (for overriding per client)
5743
local handlers = {
5844
['textDocument/hover'] = Lsp.with(lsp_handlers.hover, {
@@ -128,6 +114,8 @@ srv.lua_ls = executable('lua-language-server') and {} or nil
128114
srv.bashls = executable({ 'bash-language-server', 'shellcheck' }) and {} or nil
129115
srv.clangd = executable('clangd') and {} or nil
130116
srv.cmake = executable('cmake-languqge-server') and {} or nil
117+
srv.css_variables = executable('css-variables-language-server') and {} or nil
118+
srv.cssls = executable('vscode-css-language-server') and {} or nil
131119
srv.html = executable('vscode-html-language-server') and {} or nil
132120
srv.jdtls = executable('jdtls') and {} or nil
133121
srv.jsonls = executable('vscode-json-language-server') and {} or nil
@@ -147,6 +135,8 @@ function srv.new()
147135
self.bashls = srv.bashls
148136
self.clangd = srv.clangd
149137
self.cmake = srv.cmake
138+
self.css_variables = srv.css_variables
139+
self.cssls = srv.cssls
150140
self.html = srv.html
151141
self.jdtls = srv.jdtls
152142
self.jsonls = srv.jsonls
@@ -194,8 +184,8 @@ local Names = {
194184
['<leader>l'] = { group = '+LSP' },
195185
}
196186

197-
if WK.available() then
198-
if WK.available() then
187+
if wk_avail() then
188+
if wk_avail() then
199189
map_dict(Names, 'wk.register', false, 'n')
200190
end
201191

@@ -301,7 +291,7 @@ au('LspAttach', {
301291
v = { ['<leader>lc'] = { group = '+Code Actions' } },
302292
}
303293

304-
if WK.available() then
294+
if wk_avail() then
305295
map_dict(Names2, 'wk.register', true, nil, buf)
306296
end
307297
map_dict(K, 'wk.register', true, nil, buf)

lua/user_api/types/lspconfig.lua

+2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ require('user_api.types.user.highlight')
5454
---@field bashls? LspServerOpts|nil
5555
---@field clangd? LspServerOpts|nil
5656
---@field cmake? LspServerOpts|nil
57+
---@field css_variables? LspServerOpts|nil
58+
---@field cssls? LspServerOpts|nil
5759
---@field html? LspServerOpts|nil
5860
---@field jdtls? LspServerOpts|nil
5961
---@field jsonls? LspServerOpts|nil

0 commit comments

Comments
 (0)