Clone this repo:

Branches

  1. a2f31da [setup] Modify boilerplate by Solly Ross · 6 weeks ago main
  2. 5270579 [owners] Add a default OWNERS file to the oss_template by Nathan Mulcahey · 9 months ago
  3. 69a8948 Update year to 2022 by James Robinson · 11 months ago
  4. 2c1cfea Update LICENSE text, year, contributors, and authors list by James Robinson · 1 year, 11 months ago
  5. ab91928 update year by Gary Miguel · 2 years, 6 months ago

Fuchsia Language Server

LSP server for Fuchsia-specific languages (FIDL, CML).

What's here?

  • /lsp: The Language Server implementation
  • /chava: A flexible parser & utilities for FIDL in Rust

See the individual subdirectories for more information.

How do I build this?

All crates here use a normal Rust build process. The LSP server itself is the default project for this workspace, so you can simply run cargo build --release from the root of the repository and get a built LSP in /target/release.

How do I use this?

See /lsp for more details, but the TL;DR is:

  • If using VS Code, grab the Fuchsia extension, which comes with a prebuilt copy, or can be configured to use a custom copy in the extension settings

  • Otherwise, follow the appropriate editor configuration for adding language servers to your editor. For example, for neovim with nvim-lspconfig:

    require('lspconfig.configs').fuchsialsp = {
    	default_config = {
    	  name = 'Fuchsia Language Server',
    	  cmd = {'/path/to/your/built/lsp'},
    	  filetypes = {'fidl', 'cml'},
    	  -- this'll be changing a bit in the future to be clearer
    	  root_dir = require('lspconfig').util.find_git_ancestor,
    	}
    }
    require('lspconfig').fuchsialsp.setup {
      -- your setup here
    }