nvim/lua/cosmic/lsp/providers/tsserver.lua
2024-06-05 09:37:04 -07:00

21 lines
430 B
Lua

local default_on_attach = require('cosmic.lsp.providers.defaults').on_attach
local M = {}
function M.on_attach(client, bufnr)
default_on_attach(client, bufnr)
end
M.root_dir = function(fname)
local util = require('lspconfig').util
return util.root_pattern(
'.git',
'tsconfig.base.json',
'tsconfig.json',
'package.json',
'.eslint.js',
'.eslint.json',
'eslint.config.js'
)(fname)
end
return M