Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

tsgo

URL: https://github.com/microsoft/typescript-go

plugins.lsp.servers.tsgo.enable

Whether to enable https://github.com/microsoft/typescript-go typescript-go is experimental port of the TypeScript compiler (tsc) and language server (tsserver) to the Go programming language. tsgo can be installed via npm npm install @typescript/native-preview. ### Monorepo support tsgo supports monorepos by default. It will automatically find the tsconfig.json or jsconfig.json corresponding to the package you are working on. This works without the need of spawning multiple instances of tsgo, saving memory. It is recommended to use the same version of TypeScript in all packages, and therefore have it available in your workspace root. The location of the TypeScript binary will be determined automatically, but only once…

Type: boolean

Default: false

Example: true

Declared by:

plugins.lsp.servers.tsgo.package

The tsgo package to use.

Alternatively, tsgo should be installed on your $PATH.

Type: null or package

Default: pkgs.typescript-go

Declared by:

plugins.lsp.servers.tsgo.packageFallback

When enabled, the language server package will be added to the end of the PATH (suffix) instead of the beginning (prefix).

This can be useful if you want local versions of the language server (e.g. from a devshell) to override the nixvim version.

Type: boolean

Default: false

Declared by:

plugins.lsp.servers.tsgo.autostart

Controls if the FileType autocommand that launches a language server is created. If false, allows for deferring language servers until manually launched with :LspStart (|lspconfig-commands|).

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.lsp.servers.tsgo.cmd

A list where each entry corresponds to the blankspace delimited part of the command that launches the server.

The first entry is the binary used to run the language server. Additional entries are passed as arguments.

Type: null or (list of string)

Default: null when package is null, otherwise null

Declared by:

plugins.lsp.servers.tsgo.extraOptions

Extra options for the tsgo language server.

Type: attribute set of anything

Default: { }

Declared by:

plugins.lsp.servers.tsgo.filetypes

Set of filetypes for which to attempt to resolve {root_dir}. May be empty, or server may specify a default value.

Type: null or (list of string)

Default: null

Declared by:

plugins.lsp.servers.tsgo.rootMarkers

A list of files that mark the root of the project/workspace.

Vim’s LSP will try to share the same language server instance for all buffers matching filetypes within the same project.

A new server instance is only spawned when opening a buffer with a different project root.

See :h lsp-config and :h vim.fs.root().

Type: null or (list of (string or raw lua code)) or raw lua code

Default: null

Plugin default: null

Declared by:

plugins.lsp.servers.tsgo.settings

The settings for this LSP.

Type: open submodule of attribute set of anything

Default: { }

Example:

{
  callback = {
    __raw = ''
      function()
        print('nixvim')
      end
    '';
  };
  foo_bar = 42;
  hostname = "localhost:8080";
}

Declared by: