feat(vim): add the deno lsp to the config
This is a bit tricky due to the filetype of deno being typescript. The typescript server automatically starts on this filetype. For now this looks in the root of the project to see if there is a deno.json or package.json. Based on this, it will pick what one to use.
This commit is contained in:
parent
7882a3cbe2
commit
cf51aa4842
1 changed files with 6 additions and 1 deletions
|
|
@ -3,11 +3,16 @@ local lspconfig = require "lspconfig"
|
||||||
local workspace_library = vim.api.nvim_get_runtime_file("lua", true)
|
local workspace_library = vim.api.nvim_get_runtime_file("lua", true)
|
||||||
table.insert(workspace_library, os.getenv "HOME" .. "/Code/src/github.com/AdeAttwood/Configz/definitions/configz.lua")
|
table.insert(workspace_library, os.getenv "HOME" .. "/Code/src/github.com/AdeAttwood/Configz/definitions/configz.lua")
|
||||||
|
|
||||||
|
local function has_file(file)
|
||||||
|
return vim.fn.filereadable(vim.fn.getcwd() .. "/" .. file) == 1
|
||||||
|
end
|
||||||
|
|
||||||
local servers = {
|
local servers = {
|
||||||
-- Language servers for the day to day web development, could probably think
|
-- Language servers for the day to day web development, could probably think
|
||||||
-- about loosing the html and css one and living with typescript, rescript
|
-- about loosing the html and css one and living with typescript, rescript
|
||||||
-- and emmet
|
-- and emmet
|
||||||
tsserver = {},
|
ts_ls = { enabled = has_file("tsconfig.json") },
|
||||||
|
denols = { enabled = has_file("deno.json") or has_file("deno.jsonc") },
|
||||||
html = {},
|
html = {},
|
||||||
cssls = {},
|
cssls = {},
|
||||||
marksman = {},
|
marksman = {},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue