ca65-lsp is a language server, parser, and semantic analyzer for the CA65 assembly dialect. It is part of ongoing efforts to improve tooling for the 6502 processor family.
Note: This project is in active development. Some features may not work fully, others at all. Please watch/star the project to stay up to date!
TBD
- VSCode
- Zed
- Neovim
-- init.lua require 'lspconfig.configs'.ca65 = { default_config = { cmd = { "/path/to/ca65-lsp" }, filetypes = { "s", "asm" }, root_dir = require 'lspconfig'.util.root_pattern('ca65.toml') } } require 'lspconfig'.ca65.setup{}
- Helix
- If it doesn't already exist, create a
languages.toml
file. I put mine in my config directory which for me (on Windows 11) is~/AppData/Roaming/helix/
- Add the following to it:
# languages.toml [language-server.ca65-lsp] command = "ca65-lsp" [[language]] name = "ca65" scope = "source.s" comment-tokens = ";" file-types = [ "ca65", "s", "asm" ] language-servers = [ "ca65-lsp" ] [[grammar]] name = "ca65" source = { git = "https://github.com/techwritescode/tree-sitter-ca65", rev = "9e73befb5c3c6852f905964c22740c9605b03af8" }
- To get syntax highlighting working
- Navigate to
<your helix install directory>/runtime/queries/
- Create a directory called
ca65
- Copy
highlights.scm
from thetechwritescode/tree-sitter-ca65
repo, underqueries/ca65/
, into theca65
directory you just created - You may need to run
hx --grammar fetch && hx --grammar build
- Navigate to
- If it doesn't already exist, create a