Skip to content

koto-lang/koto-ls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

koto-ls

An implementation of the Language Server Protocol for the Koto programming language.

Installation

The koto-ls executable can be installed from the current directory by running cargo install --path ..

Features

Along with reporting compilation errors, the following LSP features are supported by koto-ls:

  • Get document symbols
  • Goto definition
  • Find references
  • Rename symbol

Editor Setup

Neovim

koto-ls can be used with neovim's built-in LSP support by creating an autocmd that runs each time a .koto file is opened.

vim.api.nvim_create_autocmd("FileType", {
  pattern = "koto",
  callback = function()
    vim.lsp.start({
      cmd = { "koto-ls" },
      root_dir = vim.fn.getcwd(),
    })
  end
})

Helix

koto-ls can be registered as a language server in your languages.toml file.

[language-server.koto-ls]
command = "koto-ls"

[[language]]
name = "koto"
scope = "source.koto"
injection-regex = "koto"
file-types = ["koto"]
comment-token = "#"
indent = { tab-width = 2, unit = "  " }
roots = []
language-servers = [ "koto-ls" ]

About

A language server for Koto

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages