2024-03-06 21:36:22 +01:00
|
|
|
-- Exit if the language server isn't available
|
|
|
|
if vim.fn.executable('asm-lsp') ~= 1 then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
-- require'lspconfig'.asm_lsp.setup{}
|
|
|
|
|
|
|
|
local root_files = {
|
|
|
|
'.asm-lsp.toml',
|
|
|
|
'.vscode',
|
|
|
|
'.git',
|
|
|
|
}
|
|
|
|
|
|
|
|
vim.lsp.start {
|
|
|
|
name = 'asm-lsp',
|
|
|
|
cmd = { 'asm-lsp' },
|
|
|
|
root_dir = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1]),
|
|
|
|
capabilities = require('user.lsp').make_client_capabilities(),
|
2024-10-01 12:55:40 +02:00
|
|
|
on_attach = function(client, bufnr)
|
|
|
|
require("nvim-navic").attach(client, bufnr)
|
|
|
|
require("workspace-diagnostics").populate_workspace_diagnostics(client, bufnr)
|
|
|
|
end,
|
2024-03-06 21:36:22 +01:00
|
|
|
-- capabilities = { offsetEncoding = "utf-8" },
|
|
|
|
}
|