From 43af656a9e1325e76c69e6f5e694214156c278f1 Mon Sep 17 00:00:00 2001 From: Marcelo Date: Sun, 30 Mar 2025 04:26:45 -0300 Subject: Replace nvim-lspconfig and blink completion with NVIM 0.11 native options. --- lsp/javascript.lua | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 lsp/javascript.lua (limited to 'lsp/javascript.lua') diff --git a/lsp/javascript.lua b/lsp/javascript.lua new file mode 100644 index 0000000..6d8e9f8 --- /dev/null +++ b/lsp/javascript.lua @@ -0,0 +1,36 @@ +return { + cmd = { + "typescript-language-server", + "--stdio", + }, + filetypes = { "javascript", "typescript" }, + -- disable_formatting = true, + root_markers = { "yarn.lock", "tsconfig.json", "jsconfig.json", "package.json", ".git" }, + single_file_support = true, + + settings = { + javascript = { + inlayHints = { + includeInlayEnumMemberValueHints = true, + includeInlayFunctionLikeReturnTypeHints = true, + includeInlayFunctionParameterTypeHints = true, + includeInlayParameterNameHints = "all", -- "none" | "literals" | "all"; + includeInlayParameterNameHintsWhenArgumentMatchesName = true, + includeInlayPropertyDeclarationTypeHints = true, + includeInlayVariableTypeHints = true, + }, + }, + + typescript = { + inlayHints = { + includeInlayEnumMemberValueHints = true, + includeInlayFunctionLikeReturnTypeHints = true, + includeInlayFunctionParameterTypeHints = true, + includeInlayParameterNameHints = "all", -- "none" | "literals" | "all"; + includeInlayParameterNameHintsWhenArgumentMatchesName = true, + includeInlayPropertyDeclarationTypeHints = true, + includeInlayVariableTypeHints = true, + }, + }, + }, +} -- cgit v1.2.3