A fast language server for the MIPS32/MIPS64 Instruction Set Architecture.
Supported assemblers: GAS, MARS, SPIM
Written in Rust with tower-lsp-server and tree-sitter.
- Completion
- Hover information
- Syntactic analysis and diagnostics
- Deep semantic analysis
- Goto definition
- Context specific completions
- Formatting
- References
- Documentation
- Macros
If you have cargo installed, you can install the language server via
cargo install mips-language-server
Download the latest release and add it to your path.
Alternatively, you can build the source yourself:
Clone the repo and simply run
cargo build --release
You can find the resulting binary in target/release/.
The dialect of your assembler/simulator (not case-sensitive).
Available: mars, spim, gas, unspecified
Mips ISA Version of you assembler/simulator. Not relevant if using mars or spim (not case-sensitive).
Available:
- Legacy MIPS versions: 'mips1' (Mips I), 'mips2', (Mips II), 'mips3', (Mips III), 'mips4' (Mips IV), 'mips5' (Mips V)
- MIPS32 versions: 'mips32r1', 'mips32r2', 'mips32r3', 'mips32r5', 'mips32r6'
- MIPS64 versions: 'mips64r1', 'mips64r2', 'mips64r3', 'mips64r5', 'mips64r6'
{
"settings": {
"mipsls": {
"dialect": "Mars",
"version": "Mips I"
}
}
}With the nvim-lspconfig plugin:
local config = {
cmd = { '/path/to/compiled/binary' },
filetypes = { 'asm' },
settings = {
mipsls = {
dialect = 'gas',
version = 'mips32r5',
}
}
}
vim.lsp.config("mipsls", config)
vim.lsp.enable("mipsls")This was mostly tested with the latest NeoVim release together with the plugins lsp-config, nvim-cmp and blink.nvim. Further testing in different environments is highly appreciated.
- MIPS64 Vol II: https://www.cipunited.com/xlx/files/document/202008/1205490289250.pdf
- MIPS Assembly/Instruction Formats: https://en.wikibooks.org/wiki/MIPS_Assembly/Instruction_Formats
- Assembly Language Programmer’s Guide: http://www.cs.unibo.it/~solmi/teaching/arch_2002-2003/AssemblyLanguageProgDoc.pdf