Configuring asm_lsp for neovim #71
-
Hi, I'm a Neovim newbie and I'd appreciate some help with setting up this LSP for my university assembly course using x64 GAS. I'm sure this will be useful for others too. I'm using LazyVim and I installed asm-lsp with :Mason, but when I open a .s file the LSP isn't working. :LspInfo says root directory not found and I don't understand what that means. I already tried to create the settings.json and .asm-lsp.toml files suggested on the readme at my project's root directory, is there something else I'm supposed to be doing? :LspInfo also lists .asm and .vasm as filetypes only, but at the top it says that it detected the filetype as .asm even though it's a .s, so I'm guessing this isn't the problem. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi! I believe it needs a git repo to attach to a buffer because of how asm-lsp has been added to nvim-lspconfig. Is your project in a git repo/ could you try running |
Beta Was this translation helpful? Give feedback.
-
Many language servers use heuristics like checking for version control metadata to determine the boundaries of a project. Having an initialized Git repository provides a clear signal to asm_lsp about where the project root is located, allowing it to properly load configuration files and set up the language server context. Thank you burgercookie for the work on this lsp, I'm enjoying it. |
Beta Was this translation helpful? Give feedback.
Hi! I believe it needs a git repo to attach to a buffer because of how asm-lsp has been added to nvim-lspconfig. Is your project in a git repo/ could you try running
git init
from the project's root directory?