Add lsp for css html and php
This commit is contained in:
parent
9ae32ef0ef
commit
c4a2316af9
7
after/plugin/lsp/lsp-css.lua
Normal file
7
after/plugin/lsp/lsp-css.lua
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
--Enable (broadcasting) snippet capability for completion
|
||||||
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||||
|
|
||||||
|
require'lspconfig'.cssls.setup {
|
||||||
|
capabilities = capabilities,
|
||||||
|
}
|
7
after/plugin/lsp/lsp-html.lua
Normal file
7
after/plugin/lsp/lsp-html.lua
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
--Enable (broadcasting) snippet capability for completion
|
||||||
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||||
|
|
||||||
|
require'lspconfig'.html.setup {
|
||||||
|
capabilities = capabilities,
|
||||||
|
}
|
@ -1,25 +1,16 @@
|
|||||||
-- lua lsp is not installed by packer but is actually a package installed with pacman
|
-- lua lsp is not installed by packer but is actually a package installed with pacman
|
||||||
require'lspconfig'.lua_ls.setup {
|
require 'lspconfig'.lua_ls.setup {
|
||||||
on_init = function(client)
|
on_init = function(client)
|
||||||
local path = client.workspace_folders[1].name
|
local path = client.workspace_folders[1].name
|
||||||
if not vim.loop.fs_stat(path..'/.luarc.json') and not vim.loop.fs_stat(path..'/.luarc.jsonc') then
|
if not vim.loop.fs_stat(path .. '/.luarc.json') and not vim.loop.fs_stat(path .. '/.luarc.jsonc') then
|
||||||
client.config.settings = vim.tbl_deep_extend('force', client.config.settings, {
|
client.config.settings = vim.tbl_deep_extend('force', client.config.settings, {
|
||||||
Lua = {
|
Lua = {
|
||||||
runtime = {
|
runtime = {
|
||||||
-- Tell the language server which version of Lua you're using
|
|
||||||
-- (most likely LuaJIT in the case of Neovim)
|
|
||||||
version = 'LuaJIT'
|
version = 'LuaJIT'
|
||||||
},
|
},
|
||||||
-- Make the server aware of Neovim runtime files
|
|
||||||
workspace = {
|
workspace = {
|
||||||
checkThirdParty = false,
|
checkThirdParty = false,
|
||||||
library = {
|
library = vim.api.nvim_get_runtime_file("", true)
|
||||||
vim.env.VIMRUNTIME
|
|
||||||
-- "${3rd}/luv/library"
|
|
||||||
-- "${3rd}/busted/library",
|
|
||||||
}
|
|
||||||
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower
|
|
||||||
-- library = vim.api.nvim_get_runtime_file("", true)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
1
after/plugin/lsp/lsp-php.lua
Normal file
1
after/plugin/lsp/lsp-php.lua
Normal file
@ -0,0 +1 @@
|
|||||||
|
require'lspconfig'.phpactor.setup{}
|
Loading…
Reference in New Issue
Block a user