Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>KittyCAD Language ServerNew to Visual Studio Code? Get it now.
KittyCAD Language Server

KittyCAD Language Server

KittyCAD

kittycad.io
|
13 installs
| (2) | Free
KittyCAD language support for Visual Studio Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

kcl-lsp

The kcl Language Server Protocol implementation.

This is just the server process. Most of the actual code for the server endpoints is in the same repo as the AST/tokenizer/parser since it's all relevant. That is modeling-app.

VSCode

Install our extension: KittyCAD Language Server

Neovim

You can add the following to your vim configuration if you are using lspconfig.

This is @jessfraz's setup.

if executable('kcl-language-server')
lua << EOF
local lspconfig = require 'lspconfig'
local configs = require 'lspconfig.configs'

if not configs.kcl_lsp then
  configs.kcl_lsp = {
    default_config = {
      cmd = {'kcl-language-server', 'server', '--stdio'},
      filetypes = {'kcl'},
      root_dir = lspconfig.util.root_pattern('.git'),
    },
    docs = {
      description = [=[
https://github.com/KittyCAD/kcl-lsp
https://kittycad.io

The KittyCAD Language Server Protocol implementation for the KCL language.

To better detect kcl files, the following can be added:


    vim.cmd [[ autocmd BufRead,BufNewFile *.kcl set filetype=kcl ]]

]=],
      default_config = {
        root_dir = [[root_pattern(".git")]],
      },
    }
  }
end

lspconfig.kcl_lsp.setup{}
EOF
else
  echo "You might want to install kcl-language-server: https://github.com/KittyCAD/kcl-lsp/releases"
end

Development

$ yarn install
$ cargo build
  • press F5 or change to the Debug panel and click Launch Client

Note

If encountered errors like Cannot find module '/xxx/xxx/dist/extension.js' please try run command tsc -b manually

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft