Configure asm-lsp installed with mason (nvim) #212
Replies: 1 comment
-
Hi! The incorrect diagnostics you're seeing on the first line is because by default, the server invokes gcc without any arguments on your source file. In order to properly provide diagnostics, you need to provide some instructions to the server on how to build your code. If you're installing through Mason, you likely have a copy of the 0.9.0 release. This version supports a |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
I’ve installed asm-lsp using Mason in Neovim, but I’m having trouble configuring it to work properly for NASM assembly on x86/x86-64. I want to use asm-lsp for syntax checking, autocompletion, and other LSP features for assembly files (.asm).
What I’ve Done:
MasonInstall asm-lsp
The installation was successful, and I can see asm-lsp in :Mason.
My assembly files are primarily written for NASM in the x86/x86-64 instruction set.
I added the following configuration to my init.lua file:
"neovim/nvim-lspconfig",
opts = {
---@type lspconfig.options
servers = {
asm_lsp = {
cmd = { "asm-lsp" }, -- Der Befehl zum Starten des LSP-Servers
filetypes = { "asm", "S", "s" }, -- Unterstützte Dateitypen
root_dir = require("lspconfig").util.root_pattern("*.asm", "Makefile"), -- Root-Verzeichnis anhand von .asm oder Makefile
settings = {
asm = {
assembler = "nasm", -- Setze NASM als Syntax
instruction_se = { "x86/x86-64" }, -- Unterstützte Architekturen
},
},
},
},
},
}
Issues:
Questions:
Beta Was this translation helpful? Give feedback.
All reactions