Documentation

Setup, Review, And Power-User Guides

Everything from authentication and commit signing to LSP, monorepos, submodules, and advanced review workflows.

Docs Category

Language Server Protocol (LSP) Support

Critiq provides intelligent code features like hover information, go-to-definition, and symbol search through Language Server Protocol (LSP) integration. LSP servers are automatically detected and started based on the languages in your repository.

Critiq is not limited to a fixed list of language servers. If a language has an LSP server, you can wire it into Critiq by adding or overriding entries in your LSP configuration.

Preconfigured Language Servers (Defaults)

Out of the box, Critiq includes default mappings for the following languages and servers:

  • Go - gopls
  • Rust - rust-analyzer
  • C# - OmniSharp
  • Vue - vue-language-server (Volar)
  • TypeScript/JavaScript - typescript-language-server (provides full project context)
  • Python - pylsp (disabled by default, enable in config if installed)

Installing Language Servers

Language servers must be installed separately on your system. Critiq can discover servers from PATH, common install locations, or explicit paths you define in config.

Go (gopls)

go install golang.org/x/tools/gopls@latest

Rust (rust-analyzer)

rustup component add rust-analyzer

C# (OmniSharp)

Download from: https://github.com/OmniSharp/omnisharp-roslyn/releases

Vue (Volar)

npm install -g @vue/language-server

TypeScript/JavaScript

npm install -g typescript-language-server typescript

Python (pylsp)

pip install python-lsp-server

Customizing LSP Configuration

You can customize language server behavior by creating a configuration file at:

  • Linux/macOS: ~/.config/critiq/lsp-servers.json
  • Windows: %APPDATA%\critiq\lsp-servers.json

Configuration Examples

Enable Python LSP:

{
  "python": {
    "enabled": true
  }
}

Disable a language server:

{
  "csharp": {
    "enabled": false
  }
}

Custom installation path:

{
  "go": {
    "command": "gopls",
    "searchPaths": [
      "/custom/path/to/gopls",
      "/home/user/go/bin/gopls"
    ]
  }
}

Add custom arguments and initialization options:

{
  "go": {
    "command": "gopls",
    "args": ["-logfile", "/tmp/gopls.log"],
    "initializationOptions": {
      "usePlaceholders": true,
      "completionDocumentation": true
    }
  }
}

Add a new language server:

{
  "ruby": {
    "enabled": true,
    "command": "solargraph",
    "args": ["stdio"],
    "fileExtensions": ["rb"]
  }
}

Configuration Options

Each language server can be configured with the following options:

  • enabled (boolean) - Whether to enable this language server. Default: true
  • command (string) - The executable command name or path
  • args (array) - Command line arguments to pass to the language server
  • fileExtensions (array) - File extensions this server should handle (e.g., ["go"])
  • searchPaths (array) - Custom paths to search for the executable if not in PATH
  • initializationOptions (object) - LSP-specific initialization options passed to the server

Your custom configuration will be merged with Critiq's defaults, so you only need to specify the options you want to change.

Troubleshooting LSP

Language server not starting:

  1. Check that the language server is installed: which gopls (or relevant command)
  2. Check the console logs in Critiq for error messages
  3. Verify the language server works from command line
  4. Add a custom searchPaths in your config if installed in a non-standard location

No code intelligence features:

  1. Ensure files are saved (LSP servers work on saved file content)
  2. Wait a few seconds for the language server to initialize on first use
  3. Check that the file extension matches the configured fileExtensions

Language server performance issues:

  1. Large repositories may take time to index
  2. Check language server documentation for performance tuning options
  3. Add tuning options via initializationOptions in your config