Skip to content

Integration with typescript.nvim? #39

Answered by VonHeikemen
zeitchef asked this question in Q&A
Discussion options

You must be logged in to vote

In this case you should use the function .build_options() to create the config for tsserver then pass that to typescript.nvim.

local lsp = require('lsp-zero')
lsp.preset('recommended')

lsp.skip_server_setup({'tsserver'})

lsp.setup()

require('typescript').setup({
  debug = false,
  server = lsp.build_options('tsserver', {})
})

If you need to customize tsserver add your options inside the curly braces. Here is an example.

lsp.build_options('tsserver', {
  on_attach = function()
    print('hello')
  end,
  settings = {
    completions = {
      completeFunctionCalls = true
    }
  }
})

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zeitchef
Comment options

Answer selected by zeitchef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants