diff --git a/nvim/.config/nvim/lua/lsp-utils.lua b/nvim/.config/nvim/lua/lsp-utils.lua index b9661ae..590c0fb 100644 --- a/nvim/.config/nvim/lua/lsp-utils.lua +++ b/nvim/.config/nvim/lua/lsp-utils.lua @@ -77,31 +77,6 @@ end local default_capabilities = vim.lsp.protocol.make_client_capabilities() -function M.bashls_config() - local root_directory = vim.fn.getcwd() - - return { - name = "bashls", - cmd = { 'bash-language-server', 'start' }, - capabilities = default_capabilities, - root_dir = root_directory, - filetypes = { 'sh' }, - single_file_support = true, - settings = { - bashIde = { - -- Glob pattern for finding and parsing shell script files in the workspace. - -- Used by the background analysis features across files. - - -- Prevent recursive scanning which will cause issues when opening a file - -- directly in the home directory (e.g. ~/foo.sh). - -- - -- Default upstream pattern is "**/*@(.sh|.inc|.bash|.command)". - globPattern = vim.env.GLOB_PATTERN or '*@(.sh|.inc|.bash|.command)', - }, - }, - } -end - function M.clangd_config() local root_files = { '.clangd', '.clang-tidy', '.clang-format', 'compile_commands.json', 'compile_flags.txt' } local clangd_cmd = { "clangd", "--background-index", "--pch-storage=memory", "--clang-tidy", "--header-insertion=never" } @@ -117,7 +92,7 @@ function M.clangd_config() capabilities = clangd_caps, root_dir = root_directory, filetypes = { 'c', 'cpp' }, - single_file_support = true, + single_file_support = false, } end @@ -317,39 +292,12 @@ function M.tsserver_config() local root_directory = get_root_directory(root_files) return { - name = "tsserver", + name = "ts_ls", cmd = { "typescript-language-server", "--stdio" }, - -- Support Yarn PnP - -- hostInfo with init_options is required to allow yarn pnp sdk to - -- identify editor and patch paths appropriately. init_options = { hostInfo = 'neovim' }, capabilities = default_capabilities, root_dir = root_directory, - filetypes = file_types, - settings = { - typescript = { - inlayHints = { - includeInlayParameterNameHints = 'all', - includeInlayParameterNameHintsWhenArgumentMatchesName = false, - includeInlayFunctionParameterTypeHints = true, - includeInlayVariableTypeHints = true, - includeInlayPropertyDeclarationTypeHints = true, - includeInlayFunctionLikeReturnTypeHints = true, - includeInlayEnumMemberValueHints = true, - } - }, - javascript = { - inlayHints = { - includeInlayParameterNameHints = 'all', - includeInlayParameterNameHintsWhenArgumentMatchesName = false, - includeInlayFunctionParameterTypeHints = true, - includeInlayVariableTypeHints = true, - includeInlayPropertyDeclarationTypeHints = true, - includeInlayFunctionLikeReturnTypeHints = true, - includeInlayEnumMemberValueHints = true, - } - } - } + filetypes = file_types } end