Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diagnostic not displaying on Windows #173

Closed
elli0t43 opened this issue Nov 18, 2024 · 24 comments · Fixed by #181
Closed

Diagnostic not displaying on Windows #173

elli0t43 opened this issue Nov 18, 2024 · 24 comments · Fixed by #181

Comments

@elli0t43
Copy link

elli0t43 commented Nov 18, 2024

What I'm trying to do

So I've installed SASM to learn assembly, and I definitely wanted neovim support in it, so I simply opened the project in neovim. so that can I write code in neovim(Neovide) and build in SASM, mainly via NASM.

What problem I'm facing

I've installed asm-lsp using Mason with lsp-zero config on Windows. However when I opened the .asm file in neovim, I'm not getting any diagnostic, I've checked the logs and even made sure that the LSP itself is connected and everything seems to be fine (as shown below)
image

What I've checked/tried

so I checked few closed issues, mainly
#115
#127
#138 (didn't understand much in this one)

Took few snippets and tried to copy paste to see if it works or not

Neovim Version

NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1713484068

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "C:/Program Files (x86)/nvim/share/nvim"

Run :checkhealth for more info

hello_world.asm

just the default code that shows up when you open SASM

section .text
global main
main:
    ;write your code here
    xor eax,,,,1
    mov ecx,
    ret

.asm-lsp.toml

[default_config]
version = "0.9.0"
assembler = "nasm"
instruction_set = "x86/x86-64"

[default_config.opts]
diagnostics = true
default_diagnostics = true

[[project]]
path = ""
version = "0.9.0"
assembler = "nasm"
instruction_set = "x86/x86-64"

[project.opts]
diagnostics = true
default_diagnostics = true

lsp-zero.lua config

-- assembly
asm_lsp = function ()
    require('lspconfig').asm_lsp.setup({
        capabilities = capabilities,
        cmd = { "asm-lsp" },
        filetypes = { "asm", "vmasm", "nasm", "s", "S" },
        single_file_support = true,
        root_dir = util.root_pattern('.git'),
        settings = {
            asm = {
                syntax = "nasm"
            },
            nasm = {
                syntax = "nasm"
            }
        }
    })
end,

:LspInfo

image

lsplog

[START][2024-11-18 14:55:55] LSP logging initiated
[ERROR][2024-11-18 14:55:55] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Starting asm_lsp...\n"
[ERROR][2024-11-18 14:55:55] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	'INFO [asm_lsp] Client initialization params: InitializeParams { process_id: Some(11140), root_path: Some("C:\\\\Users\\\\elli0t43\\\\Desktop\\\\asm"), root_uri: Some(Uri(Uri { scheme: Some("file"), authority: Some(Authority { userinfo: None, host: Host { text: "", data: RegName("") }, port: None }), path: "/C:/Users/elli0t43/Desktop/asm", query: None, fragment: None })), initialization_options: Some(Object {}), capabilities: ClientCapabilities { workspace: Some(WorkspaceClientCapabilities { apply_edit: Some(true), workspace_edit: Some(WorkspaceEditClientCapabilities { document_changes: None, resource_operations: Some([Rename, Create, Delete]), failure_handling: None, normalizes_line_endings: None, change_annotation_support: None }), did_change_configuration: Some(DynamicRegistrationClientCapabilities { dynamic_registration: Some(false) }), did_change_watched_files: Some(DidChangeWatchedFilesClientCapabilities { dynamic_registration: Some(true), relative_pattern_support: Some(true) }), symbol: Some(WorkspaceSymbolClientCapabilities { dynamic_registration: Some(false), symbol_kind: Some(SymbolKindCapability { value_set: Some([File, Module, Namespace, Package, Class, Method, Property, Field, Constructor, Enum, Interface, Function, Variable, Constant, String, Number, Boolean, Array, Object, Key, Null, EnumMember, Struct, Event, Operator, TypeParameter]) }), tag_support: None, resolve_support: None }), execute_command: None, workspace_folders: Some(true), configuration: Some(true), semantic_tokens: Some(SemanticTokensWorkspaceClientCapabilities { refresh_support: Some(true) }), code_lens: None, file_operations: None, inline_value: None, inlay_hint: Some(InlayHintWorkspaceClientCapabilities { refresh_support: Some(true) }), diagnostic: None }), text_document: Some(TextDocumentClientCapabilities { synchronization: Some(TextDocumentSyncClientCapabilities { dynamic_registration: Some(false), will_save: Some(true), will_save_wait_until: Some(true), did_save: Some(true) }), completion: Some(CompletionClientCapabilities { dynamic_registration: Some(false), completion_item: Some(CompletionItemCapability { snippet_support: Some(true), commit_characters_support: Some(true), documentation_format: Some([Markdown, PlainText]), deprecated_support: Some(true), preselect_support: Some(true), tag_support: Some(TagSupport { value_set: [Deprecated] }), insert_replace_support: Some(true), resolve_support: Some(CompletionItemCapabilityResolveSupport { properties: ["documentation", "detail", "additionalTextEdits", "sortText", "filterText", "insertText", "textEdit", "insertTextFormat", "insertTextMode"] }), insert_text_mode_support: Some(InsertTextModeSupport { value_set: [AsIs, AdjustIndentation] }), label_details_support: Some(true) }), completion_item_kind: Some(CompletionItemKindCapability { value_set: Some([Text, Method, Function, Constructor, Field, Variable, Class, Interface, Module, Property, Unit, Value, Enum, Keyword, Snippet, Color, File, Reference, Folder, EnumMember, Constant, Struct, Event, Operator, TypeParameter]) }), context_support: Some(true), insert_text_mode: Some(AsIs), completion_list: Some(CompletionListCapability { item_defaults: Some(["commitCharacters", "editRange", "insertTextFormat", "insertTextMode", "data"]) }) }), hover: Some(HoverClientCapabilities { dynamic_registration: Some(true), content_format: Some([Markdown, PlainText]) }), signature_help: Some(SignatureHelpClientCapabilities { dynamic_registration: Some(false), signature_information: Some(SignatureInformationSettings { documentation_format: Some([Markdown, PlainText]), parameter_information: Some(ParameterInformationSettings { label_offset_support: Some(true) }), active_parameter_support: Some(true) }), context_support: None }), references: Some(DynamicRegistrationClientCapabilities { dynamic_registration: Some(false) }), document_highlight: Some(DynamicRegistrationClientCapabilities { dynamic_registration: Some(false) }), document_symbol: Some(DocumentSymbolClientCapabilities { dynamic_registration: Some(false), symbol_kind: Some(SymbolKindCapability { value_set: Some([File, Module, Namespace, Package, Class, Method, Property, Field, Constructor, Enum, Interface, Function, Variable, Constant, String, Number, Boolean, Array, Object, Key, Null, EnumMember, Struct, Event, Operator, TypeParameter]) }), hierarchical_document_symbol_support: Some(true), tag_support: None }), formatting: Some(DynamicRegistrationClientCapabilities { dynamic_registration: Some(true) }), range_formatting: Some(DynamicRegistrationClientCapabilities { dynamic_registration: Some(true) }), on_type_formatting: None, declaration: Some(GotoCapability { dynamic_registration: None, link_support: Some(true) }), definition: Some(GotoCapability { dynamic_registration: Some(true), link_support: Some(true) }), type_definition: Some(GotoCapability { dynamic_registration: None, link_support: Some(true) }), implementation: Some(GotoCapability { dynamic_registration: None, link_support: Some(true) }), code_action: Some(CodeActionClientCapabilities { dynamic_registration: Some(true), code_action_literal_support: Some(CodeActionLiteralSupport { code_action_kind: CodeActionKindLiteralSupport { value_set: ["", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports"] } }), is_preferred_support: Some(true), disabled_support: None, data_support: Some(true), resolve_support: Some(CodeActionCapabilityResolveSupport { properties: ["edit"] }), honors_change_annotations: None }), code_lens: None, document_link: None, color_provider: None, rename: Some(RenameClientCapabilities { dynamic_registration: Some(true), prepare_support: Some(true), prepare_support_default_behavior: None, honors_change_annotations: None }), publish_diagnostics: Some(PublishDiagnosticsClientCapabilities { related_information: Some(true), tag_support: Some(TagSupport { value_set: [Unnecessary, Deprecated] }), version_support: None, code_description_support: None, data_support: Some(true) }), folding_range: None, selection_range: None, linked_editing_range: None, call_hierarchy: Some(DynamicRegistrationClientCapabilities { dynamic_registration: Some(false) }), semantic_tokens: Some(SemanticTokensClientCapabilities { dynamic_registration: Some(false), requests: SemanticTokensClientCapabilitiesRequests { range: Some(false), full: Some(Delta { delta: Some(true) }) }, token_types: [SemanticTokenType("namespace"), SemanticTokenType("type"), SemanticTokenType("class"), SemanticTokenType("enum"), SemanticTokenType("interface"), SemanticTokenType("struct"), SemanticTokenType("typeParameter"), SemanticTokenType("parameter"), SemanticTokenType("variable"), SemanticTokenType("property"), SemanticTokenType("enumMember"), SemanticTokenType("event"), SemanticTokenType("function"), SemanticTokenType("method"), SemanticTokenType("macro"), SemanticTokenType("keyword"), SemanticTokenType("modifier"), SemanticTokenType("comment"), SemanticTokenType("string"), SemanticTokenType("number"), SemanticTokenType("regexp"), SemanticTokenType("operator"), SemanticTokenType("decorator")], token_modifiers: [SemanticTokenModifier("declaration"), SemanticTokenModifier("definition"), SemanticTokenModifier("readonly"), SemanticTokenModifier("static"), SemanticTokenModifier("deprecated"), SemanticTokenModifier("abstract"), SemanticTokenModifier("async"), SemanticTokenModifier("modification"), SemanticTokenModifier("documentation"), SemanticTokenModifier("defaultLibrary")], formats: [TokenFormat("relative")], overlapping_token_support: Some(true), multiline_token_support: Some(false), server_cancel_support: Some(false), augments_syntax_tokens: Some(true) }), moniker: None, type_hierarchy: None, inline_value: None, inlay_hint: Some(InlayHintClientCapabilities { dynamic_registration: Some(true), resolve_support: Some(InlayHintResolveClientCapabilities { properties: ["textEdits", "tooltip", "location", "command"] }) }), diagnostic: Some(DiagnosticClientCapabilities { dynamic_registration: Some(false), related_document_support: None }) }), notebook_document: None, window: Some(WindowClientCapabilities { work_done_progress: Some(true), show_message: Some(ShowMessageRequestClientCapabilities { message_action_item: Some(MessageActionItemCapabilities { additional_properties_support: Some(false) }) }), show_document: Some(ShowDocumentClientCapabilities { support: true }) }), general: Some(GeneralClientCapabilities { regular_expressions: None, markdown: None, stale_request_support: None, position_encodings: Some([PositionEncodingKind("utf-16")]) }), experimental: None }, trace: Some(Off), workspace_folders: Some([WorkspaceFolder { uri: Uri(Uri { scheme: Some("file"), authority: Some(Authority { userinfo: None, host: Host { text: "", data: RegName("") }, port: None }), path: "/C:/Users/elli0t43/Desktop/asm", query: None, fragment: None }), name: "C:/Users/elli0t43/Desktop/asm" }]), client_info: Some(ClientInfo { name: "Neovim", version: Some("0.10.1+g7e194f0d0") }), locale: None, work_done_progress_params: WorkDoneProgressParams { work_done_token: Some(String("1")) } }\nINFO [asm_lsp::lsp] Creating directories along C:\\Users\\elli0t43\\AppData\\Roaming\\asm-lsp as necessary...\nERROR [asm_lsp::lsp] Failed to parse global config file C:\\Users\\elli0t43\\AppData\\Roaming\\asm-lsp\\.asm-lsp.toml - Error: TOML parse error at line 1, column 1\n  |\n1 | [default_config]\n  | ^\nmissing field `version`\n\n\nERROR [asm_lsp::lsp] Failed to parse project config file \\\\?\\C:\\Users\\elli0t43\\Desktop\\asm\\.asm-lsp.toml - Error: TOML parse error at line 1, column 1\n  |\n1 | [default_config]\n  | ^\nmissing field `version`\n\nINFO [asm_lsp] Server Configuration: Config { version: "0.1", assemblers: Assemblers { gas: Some(true), go: Some(true), masm: Some(false), nasm: Some(false), z80: Some(false) }, instruction_sets: InstructionSets { x86: Some(true), x86_64: Some(true), z80: Some(false), arm: Some(false), riscv: Some(false) }, opts: ConfigOptions { compiler: None, diagnostics: Some(true), default_diagnostics: Some(true) } }\n'
[ERROR][2024-11-18 14:55:55] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] x86 instruction set loaded in 12ms\n"
[ERROR][2024-11-18 14:55:55] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] x86-64 instruction set loaded in 12ms\n"
[ERROR][2024-11-18 14:55:55] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] x86 register set loaded in 0ms\n"
[ERROR][2024-11-18 14:55:55] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] x86-64 register set loaded in 0ms\n"
[ERROR][2024-11-18 14:55:55] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Gas directive set loaded in 0ms\n"
[ERROR][2024-11-18 14:55:55] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Loaded compile commands: []\n"
[ERROR][2024-11-18 14:55:56] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::lsp] Include directory map: {All: []}\nINFO [asm_lsp] Starting asm_lsp loop...\n"
[ERROR][2024-11-18 14:55:56] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Did open text document notification serviced in 0ms\n"
[ERROR][2024-11-18 14:55:56] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:55:56] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Diagnostics request serviced in 32ms\n"
[ERROR][2024-11-18 14:55:58] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Did change text document notification serviced in 0ms\n"
[ERROR][2024-11-18 14:55:58] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:55:58] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Diagnostics request serviced in 30ms\n"
[ERROR][2024-11-18 14:55:58] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Did change text document notification serviced in 0ms\n"
[ERROR][2024-11-18 14:55:58] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Completion request serviced in 1ms\n"
[ERROR][2024-11-18 14:55:58] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:55:58] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Diagnostics request serviced in 27ms\n"
[ERROR][2024-11-18 14:55:59] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Did change text document notification serviced in 0ms\n"
[ERROR][2024-11-18 14:55:59] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:55:59] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Diagnostics request serviced in 26ms\n"
[ERROR][2024-11-18 14:55:59] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Did change text document notification serviced in 0ms\n"
[ERROR][2024-11-18 14:55:59] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:55:59] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Diagnostics request serviced in 25ms\n"
[ERROR][2024-11-18 14:55:59] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Did change text document notification serviced in 0ms\n"
[ERROR][2024-11-18 14:55:59] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:55:59] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Diagnostics request serviced in 25ms\n"
[ERROR][2024-11-18 14:56:00] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Did change text document notification serviced in 0ms\n"
[ERROR][2024-11-18 14:56:00] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:56:00] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Diagnostics request serviced in 26ms\n"
[ERROR][2024-11-18 14:56:00] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Did change text document notification serviced in 0ms\n"
[ERROR][2024-11-18 14:56:00] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Completion request serviced in 0ms\n"
[ERROR][2024-11-18 14:56:00] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:56:00] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Diagnostics request serviced in 39ms\n"
[ERROR][2024-11-18 14:56:01] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:56:01] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Published diagnostics on save in 26ms\n"
[ERROR][2024-11-18 14:56:01] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:56:01] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Published diagnostics on save in 26ms\n"
[ERROR][2024-11-18 14:56:01] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:56:01] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Published diagnostics on save in 29ms\n"
[ERROR][2024-11-18 14:56:23] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Did change text document notification serviced in 0ms\n"
[ERROR][2024-11-18 14:56:23] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:56:23] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Diagnostics request serviced in 30ms\n"
[ERROR][2024-11-18 14:56:23] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Did change text document notification serviced in 0ms\n"
[ERROR][2024-11-18 14:56:23] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Completion request serviced in 19ms\nINFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:56:23] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Diagnostics request serviced in 29ms\n"
[ERROR][2024-11-18 14:56:23] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Did change text document notification serviced in 0ms\n"
[ERROR][2024-11-18 14:56:23] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Completion request serviced in 13ms\nINFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:56:23] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Diagnostics request serviced in 27ms\n"
[ERROR][2024-11-18 14:56:23] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Did change text document notification serviced in 0ms\n"
[ERROR][2024-11-18 14:56:23] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Completion request serviced in 13ms\nINFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:56:23] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Diagnostics request serviced in 27ms\n"
[ERROR][2024-11-18 14:56:24] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Did change text document notification serviced in 0ms\n"
[ERROR][2024-11-18 14:56:24] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:56:24] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Diagnostics request serviced in 28ms\n"
[ERROR][2024-11-18 14:56:24] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Did change text document notification serviced in 0ms\n"
[ERROR][2024-11-18 14:56:24] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Completion request serviced in 3ms\nINFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:56:24] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Diagnostics request serviced in 36ms\n"
[ERROR][2024-11-18 14:56:24] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Did change text document notification serviced in 0ms\n"
[ERROR][2024-11-18 14:56:24] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Completion request serviced in 0ms\nINFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:56:24] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Diagnostics request serviced in 25ms\n"
[ERROR][2024-11-18 14:56:25] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Did change text document notification serviced in 0ms\n"
[ERROR][2024-11-18 14:56:25] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Completion request serviced in 0ms\nINFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:56:25] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Diagnostics request serviced in 26ms\n"
[ERROR][2024-11-18 14:56:25] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Did change text document notification serviced in 0ms\n"
[ERROR][2024-11-18 14:56:25] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:56:25] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Diagnostics request serviced in 26ms\n"
[ERROR][2024-11-18 14:56:26] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:56:26] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Published diagnostics on save in 30ms\n"
[ERROR][2024-11-18 14:56:26] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::handle] No applicable user-provided commands for /C:/Users/elli0t43/Desktop/asm/hello_world.asm. Applying default compile command\n"
[ERROR][2024-11-18 14:56:26] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Published diagnostics on save in 28ms\n"

I believe I included everything, also if there's any blunder on my end I apologize.

@WillLillis
Copy link
Collaborator

Thank you for the detailed report! One suspicious thing I see is the empty string being used as the path for your project config. I will be able to repro and take a much closer look later (hopefully tonight) :)

@WillLillis
Copy link
Collaborator

Oh now that you mention you're on Windows, can you check if gcc and/or clang are available on your system's path? asm-lsp doesn't ship a compiler and instead relies on one being installed on the system to provide diagnostics. If you have one you'd like to use, you can provide the path to it as part of the opts.compiler configuration field.

@WillLillis
Copy link
Collaborator

Not able to reproduce locally (I don't think there's any windows specific issues here) off of the latest master, but I'd really like to help troubleshoot. Could you check which commit your build of asm-lsp is from and if you have clang and/or gcc on your path?

image

@elli0t43
Copy link
Author

elli0t43 commented Nov 19, 2024

Oh now that you mention you're on Windows, can you check if gcc and/or clang are available on your system's path? asm-lsp doesn't ship a compiler and instead relies on one being installed on the system to provide diagnostics. If you have one you'd like to use, you can provide the path to it as part of the opts.compiler configuration field.

gcc is indeed in path
image

for some reason when I was setting up the default config, and I put gcc, it said its not in path, which is weird because I use gcc from terminal most of the times and I've added to it to path myself

on the updated replies

I might be missing clang here, let me try to installing it and see if it helps, otherwise gcc seems to be in path, but I'll double check anyways

@WillLillis
Copy link
Collaborator

Oh now that you mention you're on Windows, can you check if gcc and/or clang are available on your system's path? asm-lsp doesn't ship a compiler and instead relies on one being installed on the system to provide diagnostics. If you have one you'd like to use, you can provide the path to it as part of the opts.compiler configuration field.

gcc is indeed in path image

for some reason when I was setting up the default config, and I put gcc, it said its not in path, which is weird because I use gcc from terminal most of the times and I've added to it to path myself

Oh interesting. It looks like this issue is Windows-specific then. The config builder's compiler validation logic should pick up gcc since it's on your path, but I guess we have a logic bug somewhere in there. I imagine a similar issue is causing the diagnostics command to misbehave. I still have a Windows install on my laptop, so I'll be able to investigate this more closely tomorrow night. Thanks so much for the fast and detailed responses! :)

on the updated replies

I might be missing clang here, let me try to installing it and see if it helps, otherwise gcc seems to be in path, but I'll double check anyways

No need to install clang, as long as you have 1 of the 2 that should be fine.

@elli0t43
Copy link
Author

Alright thanks for taking the time to look into it, really appreciate it 😊

meanwhile check this screenshot, I believe its probably not working because it can't find the $PATH or maybe it expects the $PATH to be something else
image

@WillLillis
Copy link
Collaborator

Out of curiosity/ as a temporary workaround, could you try providing the absolute path to gcc as you config's compiler field to see if that changes anything? What does where gcc spit out for you?

@elli0t43
Copy link
Author

Out of curiosity/ as a temporary workaround, could you try providing the absolute path to gcc as you config's compiler field to see if that changes anything? What does where gcc spit out for you?

where doesn't seem to find anything, but putting the path does work, tho not getting any diagnostic still
image

@WillLillis
Copy link
Collaborator

Ah, this is super weird. I tried invoking gcc on your example file manually and I think I found the problem. When using the .asm extension, gcc does not know how to treat your assembly code:

image

The server can't get anything useful out of those message, so that's why there aren't any diagnostics showing up. This behavior is also seen on Linux:

image

I wasn't able to reproduce locally in my arch install because clang (for whatever reason, I don't know) does not care about the file extension and will emit actual errors:

image

Changing the file extension to .s fixes the issue for gcc as well (on Windows and Linux):

image
image

It looks like gcc and/or clang haven't been added to your path properly, otherwise where should show their locations:

image

I believe changing the file extension (along with specifying the full path to the compiler iin your config) should clear up any issues your having. I'm not sure what steps to take to debug the issue of gcc/clang not being fully detected on your path besides manually checking the environment variable. It's bizarre that you can invoke them but where doesn't find them.

Try those fixes out and let me know if they work/ if you figure anything else out. Thanks so much for your patience! :)

@elli0t43
Copy link
Author

elli0t43 commented Nov 19, 2024

I removed the default config and overwrote it via -g -w
and for some reasons I'm getting this

image

On top of this, as shown in the #115, I've also tried to add compile_commands.json

[
    {
        "directory": "C:/Users/elli0t43/Desktop/asm",
        "command": "C:/Program Files/NASM/nasm.exe -f elf64 -o C:/Users/elli0t43/Desktop/asm/hello_world.o C:/Users/elli0t43/Desktop/asm/hello_world.asm",
        "file": "C:/Users/elli0t43/Desktop/asm/hello_world.asm"
    }
]

also thought it could the single backward slashes, I've tried with double, because many lsp's require double

@elli0t43
Copy link
Author

Let me know if its okay or not, because I think this is the correct way to add to path

image

@WillLillis
Copy link
Collaborator

Let me know if its okay or not, because I think this is the correct way to add to path

image

That looks ok, the only thing I'd try is adding the same compiler paths to your own user PATH variable in addition to the system one.

@WillLillis
Copy link
Collaborator

I removed the default config and overwrote it via -g -w and for some reasons I'm getting this

image

On top of this, as shown in the #115, I've also tried to add compile_commands.json

[
    {
        "directory": "C:/Users/elli0t43/Desktop/asm",
        "command": "C:/Program Files/NASM/nasm.exe -f elf64 -o C:/Users/elli0t43/Desktop/asm/hello_world.o C:/Users/elli0t43/Desktop/asm/hello_world.asm",
        "file": "C:/Users/elli0t43/Desktop/asm/hello_world.asm"
    }
]

also thought it could the single backward slashes, I've tried with double, because many lsp's require double

I'm not super sure what format is expected for compile_commands.json here, but I can check that in a bit. Most compile_commands.json files I've used have been autogenerated by other tooling (i.e. CMake). If you're only concerned with a single file though, it may be easier to use the compile_flags.txt format.

Regarding the parsing error, I'm very confused. I'm going to have to call it a night soon, but I will continue looking into this tomorrow night.

@elli0t43
Copy link
Author

elli0t43 commented Nov 19, 2024

The whole compile_commands.json is kind of confusing because I changed it to the same one from SASM, and it does work on the command line, but for some reason on the lsp log its still throwing config error, I would have to look into it again, might reinstall asm-lsp all together to check

meanwhile realized where doesn't work with powershell (the polished one) and also the default one unless added to the path, but does work with CMD
image

but this works
image

@WillLillis
Copy link
Collaborator

I have an idea of what I need to fix for the windows compiler validation.

Regarding the parsing issues you're seeing, I believe it's a version mismatch. At the start of the logs, we see Starting asm_lsp...\n . This log does not have a version number in it, which was added in #158. It looks like you have an up to date (off of the master branch) version of asm-lsp generating your config, but an older version of asm-lsp launching in with your editor and attempting to parse said config.

@elli0t43
Copy link
Author

I have an idea of what I need to fix for the windows compiler validation.

Regarding the parsing issues you're seeing, I believe it's a version mismatch. At the start of the logs, we see Starting asm_lsp...\n . This log does not have a version number in it, which was added in #158. It looks like you have an up to date (off of the master branch) version of asm-lsp generating your config, but an older version of asm-lsp launching in with your editor and attempting to parse said config.

I think I know why, so I've installed the lsp with cargo install --git https://github.com/bergercookie/asm-lsp asm-lsp

And then mason installed it, I thought it would be similar to terraform-ls where you would need the binary first, and I've ran the cargo manual installation again, But yeah Let me remove everything and only let it install from mason

@WillLillis
Copy link
Collaborator

The compiler validation issues should be fixed by #176.

@elli0t43
Copy link
Author

elli0t43 commented Nov 21, 2024

A quick doubt, for some reason I reinstalled everything, but if I run asm-lsp gen-config -w its just starting the asm-lsp

I installed it via cargo install asm-lsp
image

cargo install --git https://github.com/bergercookie/asm-lsp asm-lsp works fine
by any chance the crates.io one is outdated ?

@WillLillis
Copy link
Collaborator

A quick doubt, for some reason I reinstalled everything, but if I run asm-lsp gen-config -w its just starting the asm-lsp

I installed it via cargo install asm-lsp

image

by any chance the crates.io one is outdated ?

Yes, crates.io only has the 0.9.0 release. The configuration overhaul happened after that release, so in order to use it you need to install off of the latest commit. Something like cargo install --git https://github.com/bergercookie/asm-lsp.git asm-lsp should do it.

@elli0t43
Copy link
Author

elli0t43 commented Nov 21, 2024

So is there any way to install the latest commit manually using mason ? because it seems in mason asm-lsp is getting installed from crates
image

EDIT: I installed it using cargo and moved it manually to the \bin directory

@elli0t43
Copy link
Author

elli0t43 commented Nov 21, 2024

Okay so I investigated why its not working, so here's logs with debug on

on WSL it works fine btw (without any config, and on crates version of the asm-lsp)

WSL logs

[START][2024-11-22 00:20:37] LSP logging initiated
[INFO][2025-11-22 00:20:37] .../vim/lsp/rpc.lua:662	"Starting RPC client"	{  args = {},  cmd = "/home/elli0t43/.local/share/nvim/mason/bin/asm-lsp",  extra = {    cwd = "/home/elli0t43/Documents/asm"  }}
[DEBUG][2025-11-22 00:20:37] .../vim/lsp/rpc.lua:284	"rpc.send"	{  id = 1,  jsonrpc = "2.0",  method = "initialize",  params = {    capabilities = {      textDocument = {        callHierarchy = {          dynamicRegistration = false        },        codeAction = {          codeActionLiteralSupport = {            codeActionKind = {              valueSet = { "", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" }            }          },          dataSupport = true,          dynamicRegistration = false,          isPreferredSupport = true,          resolveSupport = {            properties = { "edit" }          }        },        completion = {          completionItem = {            commitCharactersSupport = true,            deprecatedSupport = true,            documentationFormat = { "markdown", "plaintext" },            insertReplaceSupport = true,            insertTextModeSupport = {              valueSet = { 1, 2 }            },            labelDetailsSupport = true,            preselectSupport = true,            resolveSupport = {              properties = { "documentation", "detail", "additionalTextEdits", "sortText", "filterText", "insertText", "textEdit", "insertTextFormat", "insertTextMode" }            },            snippetSupport = true,            tagSupport = {              valueSet = { 1 }            }          },          completionItemKind = {            valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 }          },          completionList = {            itemDefaults = { "commitCharacters", "editRange", "insertTextFormat", "insertTextMode", "data" }          },          contextSupport = true,          dynamicRegistration = false,          insertTextMode = 1        },        declaration = {          linkSupport = true        },        definition = {          linkSupport = true        },        documentHighlight = {          dynamicRegistration = false        },        documentSymbol = {          dynamicRegistration = false,          hierarchicalDocumentSymbolSupport = true,          symbolKind = {            valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }          }        },        hover = {          contentFormat = { "markdown", "plaintext" },          dynamicRegistration = false        },        implementation = {          linkSupport = true        },        publishDiagnostics = {          relatedInformation = true,          tagSupport = {            valueSet = { 1, 2 }          }        },        references = {          dynamicRegistration = false        },        rename = {          dynamicRegistration = false,          prepareSupport = true        },        semanticTokens = {          augmentsSyntaxTokens = true,          dynamicRegistration = false,          formats = { "relative" },          multilineTokenSupport = false,          overlappingTokenSupport = true,          requests = {            full = {              delta = true            },            range = false          },          serverCancelSupport = false,          tokenModifiers = { "declaration", "definition", "readonly", "static", "deprecated", "abstract", "async", "modification", "documentation", "defaultLibrary" },          tokenTypes = { "namespace", "type", "class", "enum", "interface", "struct", "typeParameter", "parameter", "variable", "property", "enumMember", "event", "function", "method", "macro", "keyword", "modifier", "comment", "string", "number", "regexp", "operator", "decorator" }        },        signatureHelp = {          dynamicRegistration = false,          signatureInformation = {            activeParameterSupport = true,            documentationFormat = { "markdown", "plaintext" },            parameterInformation = {              labelOffsetSupport = true            }          }        },        synchronization = {          didSave = true,          dynamicRegistration = false,          willSave = true,          willSaveWaitUntil = true        },        typeDefinition = {          linkSupport = true        }      },      window = {        showDocument = {          support = true        },        showMessage = {          messageActionItem = {            additionalPropertiesSupport = false          }        },        workDoneProgress = true      },      workspace = {        applyEdit = true,        configuration = true,        didChangeWatchedFiles = {          dynamicRegistration = false,          relativePatternSupport = true        },        semanticTokens = {          refreshSupport = true        },        symbol = {          dynamicRegistration = false,          hierarchicalWorkspaceSymbolSupport = true,          symbolKind = {            valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }          }        },        workspaceEdit = {          resourceOperations = { "rename", "create", "delete" }        },        workspaceFolders = true      }    },    clientInfo = {      name = "Neovim",      version = "0.9.5"    },    initializationOptions = vim.empty_dict(),    processId = 9728,    rootPath = vim.NIL,    rootUri = vim.NIL,    trace = "off",    workspaceFolders = vim.NIL  }}
[ERROR][2025-11-22 00:20:37] .../vim/lsp/rpc.lua:734	"rpc"	"/home/elli0t43/.local/share/nvim/mason/bin/asm-lsp"	"stderr"	"INFO [asm_lsp] Starting asm_lsp...\n"
[DEBUG][2025-11-22 00:20:37] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  id = 1,  jsonrpc = "2.0",  result = {    capabilities = {      completionProvider = {        completionItem = {          labelDetailsSupport = true        },        triggerCharacters = { "%", "." }      },      definitionProvider = true,      diagnosticProvider = {        identifier = "asm-lsp",        interFileDependencies = true,        workspaceDiagnostics = false      },      documentSymbolProvider = true,      hoverProvider = true,      positionEncoding = "utf-16",      referencesProvider = true,      signatureHelpProvider = {        workDoneProgress = false      },      textDocumentSync = 2    }  }}
[DEBUG][2025-11-22 00:20:37] .../vim/lsp/rpc.lua:284	"rpc.send"	{  jsonrpc = "2.0",  method = "initialized",  params = vim.empty_dict()}
[DEBUG][2025-11-22 00:20:37] .../vim/lsp/rpc.lua:284	"rpc.send"	{  jsonrpc = "2.0",  method = "workspace/didChangeConfiguration",  params = {    settings = {      asm = {        syntax = "nasm"      },      nasm = {        syntax = "nasm"      }    }  }}
[DEBUG][2025-11-22 00:20:37] .../vim/lsp/rpc.lua:284	"rpc.send"	{  jsonrpc = "2.0",  method = "workspace/didChangeConfiguration",  params = {    settings = {      asm = {        syntax = "nasm"      },      nasm = {        syntax = "nasm"      }    }  }}
[INFO][2025-11-22 00:20:37] .../lua/vim/lsp.lua:1344	"LSP[asm_lsp]"	"server_capabilities"	{  server_capabilities = {    completionProvider = {      completionItem = {        labelDetailsSupport = true      },      triggerCharacters = { "%", "." }    },    definitionProvider = true,    diagnosticProvider = {      identifier = "asm-lsp",      interFileDependencies = true,      workspaceDiagnostics = false    },    documentSymbolProvider = true,    hoverProvider = true,    positionEncoding = "utf-16",    referencesProvider = true,    signatureHelpProvider = {      workDoneProgress = false    },    textDocumentSync = {      change = 2,      openClose = true,      save = {        includeText = false      },      willSave = false,      willSaveWaitUntil = false    }  }}
[DEBUG][2025-11-22 00:20:37] .../vim/lsp/rpc.lua:284	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didOpen",  params = {    textDocument = {      languageId = "asm",      text = "section .text\nglobal main\nmain:\n    ;write your code here\n    xor eax,,,1\n    \n    mov ecx, 2\n    ret\n\n\n",      uri = "file:///home/elli0t43/Documents/asm/test.s",      version = 0    }  }}
[ERROR][2025-11-22 00:20:37] .../vim/lsp/rpc.lua:734	"rpc"	"/home/elli0t43/.local/share/nvim/mason/bin/asm-lsp"	"stderr"	'INFO [asm_lsp] Client initialization params: InitializeParams { process_id: Some(9728), root_path: None, root_uri: None, initialization_options: Some(Object {}), capabilities: ClientCapabilities { workspace: Some(WorkspaceClientCapabilities { apply_edit: Some(true), workspace_edit: Some(WorkspaceEditClientCapabilities { document_changes: None, resource_operations: Some([Rename, Create, Delete]), failure_handling: None, normalizes_line_endings: None, change_annotation_support: None }), did_change_configuration: None, did_change_watched_files: Some(DidChangeWatchedFilesClientCapabilities { dynamic_registration: Some(false), relative_pattern_support: Some(true) }), symbol: Some(WorkspaceSymbolClientCapabilities { dynamic_registration: Some(false), symbol_kind: Some(SymbolKindCapability { value_set: Some([File, Module, Namespace, Package, Class, Method, Property, Field, Constructor, Enum, Interface, Function, Variable, Constant, String, Number, Boolean, Array, Object, Key, Null, EnumMember, Struct, Event, Operator, TypeParameter]) }), tag_support: None, resolve_support: None }), execute_command: None, workspace_folders: Some(true), configuration: Some(true), semantic_tokens: Some(SemanticTokensWorkspaceClientCapabilities { refresh_support: Some(true) }), code_lens: None, file_operations: None, inline_value: None, inlay_hint: None, diagnostic: None }), text_document: Some(TextDocumentClientCapabilities { synchronization: Some(TextDocumentSyncClientCapabilities { dynamic_registration: Some(false), will_save: Some(true), will_save_wait_until: Some(true), did_save: Some(true) }), completion: Some(CompletionClientCapabilities { dynamic_registration: Some(false), completion_item: Some(CompletionItemCapability { snippet_support: Some(true), commit_characters_support: Some(true), documentation_format: Some([Markdown, PlainText]), deprecated_support: Some(true), preselect_support: Some(true), tag_support: Some(TagSupport { value_set: [Deprecated] }), insert_replace_support: Some(true), resolve_support: Some(CompletionItemCapabilityResolveSupport { properties: ["documentation", "detail", "additionalTextEdits", "sortText", "filterText", "insertText", "textEdit", "insertTextFormat", "insertTextMode"] }), insert_text_mode_support: Some(InsertTextModeSupport { value_set: [AsIs, AdjustIndentation] }), label_details_support: Some(true) }), completion_item_kind: Some(CompletionItemKindCapability { value_set: Some([Text, Method, Function, Constructor, Field, Variable, Class, Interface, Module, Property, Unit, Value, Enum, Keyword, Snippet, Color, File, Reference, Folder, EnumMember, Constant, Struct, Event, Operator, TypeParameter]) }), context_support: Some(true), insert_text_mode: Some(AsIs), completion_list: Some(CompletionListCapability { item_defaults: Some(["commitCharacters", "editRange", "insertTextFormat", "insertTextMode", "data"]) }) }), hover: Some(HoverClientCapabilities { dynamic_registration: Some(false), content_format: Some([Markdown, PlainText]) }), signature_help: Some(SignatureHelpClientCapabilities { dynamic_registration: Some(false), signature_information: Some(SignatureInformationSettings { documentation_format: Some([Markdown, PlainText]), parameter_information: Some(ParameterInformationSettings { label_offset_support: Some(true) }), active_parameter_support: Some(true) }), context_support: None }), references: Some(DynamicRegistrationClientCapabilities { dynamic_registration: Some(false) }), document_highlight: Some(DynamicRegistrationClientCapabilities { dynamic_registration: Some(false) }), document_symbol: Some(DocumentSymbolClientCapabilities { dynamic_registration: Some(false), symbol_kind: Some(SymbolKindCapability { value_set: Some([File, Module, Namespace, Package, Class, Method, Property, Field, Constructor, Enum, Interface, Function, Variable, Constant, String, Number, Boolean, Array, Object, Key, Null, EnumMember, Struct, Event, Operator, TypeParameter]) }), hierarchical_document_symbol_support: Some(true), tag_support: None }), formatting: None, range_formatting: None, on_type_formatting: None, declaration: Some(GotoCapability { dynamic_registration: None, link_support: Some(true) }), definition: Some(GotoCapability { dynamic_registration: None, link_support: Some(true) }), type_definition: Some(GotoCapability { dynamic_registration: None, link_support: Some(true) }), implementation: Some(GotoCapability { dynamic_registration: None, link_support: Some(true) }), code_action: Some(CodeActionClientCapabilities { dynamic_registration: Some(false), code_action_literal_support: Some(CodeActionLiteralSupport { code_action_kind: CodeActionKindLiteralSupport { value_set: ["", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports"] } }), is_preferred_support: Some(true), disabled_support: None, data_support: Some(true), resolve_support: Some(CodeActionCapabilityResolveSupport { properties: ["edit"] }), honors_change_annotations: None }), code_lens: None, document_link: None, color_provider: None, rename: Some(RenameClientCapabilities { dynamic_registration: Some(false), prepare_support: Some(true), prepare_support_default_behavior: None, honors_change_annotations: None }), publish_diagnostics: Some(PublishDiagnosticsClientCapabilities { related_information: Some(true), tag_support: Some(TagSupport { value_set: [Unnecessary, Deprecated] }), version_support: None, code_description_support: None, data_support: None }), folding_range: None, selection_range: None, linked_editing_range: None, call_hierarchy: Some(DynamicRegistrationClientCapabilities { dynamic_registration: Some(false) }), semantic_tokens: Some(SemanticTokensClientCapabilities { dynamic_registration: Some(false), requests: SemanticTokensClientCapabilitiesRequests { range: Some(false), full: Some(Delta { delta: Some(true) }) }, token_types: [SemanticTokenType("namespace"), SemanticTokenType("type"), SemanticTokenType("class"), SemanticTokenType("enum"), SemanticTokenType("interface"), SemanticTokenType("struct"), SemanticTokenType("typeParameter"), SemanticTokenType("parameter"), SemanticTokenType("variable"), SemanticTokenType("property"), SemanticTokenType("enumMember"), SemanticTokenType("event"), SemanticTokenType("function"), SemanticTokenType("method"), SemanticTokenType("macro"), SemanticTokenType("keyword"), SemanticTokenType("modifier"), SemanticTokenType("comment"), SemanticTokenType("string"), SemanticTokenType("number"), SemanticTokenType("regexp"), SemanticTokenType("operator"), SemanticTokenType("decorator")], token_modifiers: [SemanticTokenModifier("declaration"), SemanticTokenModifier("definition"), SemanticTokenModifier("readonly"), SemanticTokenModifier("static"), SemanticTokenModifier("deprecated"), SemanticTokenModifier("abstract"), SemanticTokenModifier("async"), SemanticTokenModifier("modification"), SemanticTokenModifier("documentation"), SemanticTokenModifier("defaultLibrary")], formats: [TokenFormat("relative")], overlapping_token_support: Some(true), multiline_token_support: Some(false), server_cancel_support: Some(false), augments_syntax_tokens: Some(true) }), moniker: None, type_hierarchy: None, inline_value: None, inlay_hint: None, diagnostic: None }), notebook_document: None, window: Some(WindowClientCapabilities { work_done_progress: Some(true), show_message: Some(ShowMessageRequestClientCapabilities { message_action_item: Some(MessageActionItemCapabilities { additional_properties_support: Some(false) }) }), show_document: Some(ShowDocumentClientCapabilities { support: true }) }), general: None, experimental: None }, trace: Some(Off), workspace_folders: None, client_info: Some(ClientInfo { name: "Neovim", version: Some("0.9.5") }), locale: None, work_done_progress_params: WorkDoneProgressParams { work_done_token: None } }\n'
[ERROR][2025-11-22 00:20:37] .../vim/lsp/rpc.lua:734	"rpc"	"/home/elli0t43/.local/share/nvim/mason/bin/asm-lsp"	"stderr"	"INFO [asm_lsp::lsp] Creating directories along /home/elli0t43/.config/asm-lsp as necessary...\n"
[ERROR][2025-11-22 00:20:37] .../vim/lsp/rpc.lua:734	"rpc"	"/home/elli0t43/.local/share/nvim/mason/bin/asm-lsp"	"stderr"	'WARN [asm_lsp::lsp] Failed to detect project root\nINFO [asm_lsp] Server Configuration: Config { version: "0.1", assemblers: Assemblers { gas: Some(true), go: Some(true), masm: Some(false), nasm: Some(false), z80: Some(false) }, instruction_sets: InstructionSets { x86: Some(true), x86_64: Some(true), z80: Some(false), arm: Some(false), riscv: Some(false) }, opts: ConfigOptions { compiler: None, diagnostics: Some(true), default_diagnostics: Some(true) } }\n'
[ERROR][2025-11-22 00:20:37] .../vim/lsp/rpc.lua:734	"rpc"	"/home/elli0t43/.local/share/nvim/mason/bin/asm-lsp"	"stderr"	"INFO [asm_lsp] x86 instruction set loaded in 17ms\n"
[ERROR][2025-11-22 00:20:37] .../vim/lsp/rpc.lua:734	"rpc"	"/home/elli0t43/.local/share/nvim/mason/bin/asm-lsp"	"stderr"	"INFO [asm_lsp] x86-64 instruction set loaded in 18ms\n"
[ERROR][2025-11-22 00:20:37] .../vim/lsp/rpc.lua:734	"rpc"	"/home/elli0t43/.local/share/nvim/mason/bin/asm-lsp"	"stderr"	"INFO [asm_lsp] x86 register set loaded in 0ms\n"
[ERROR][2025-11-22 00:20:37] .../vim/lsp/rpc.lua:734	"rpc"	"/home/elli0t43/.local/share/nvim/mason/bin/asm-lsp"	"stderr"	"INFO [asm_lsp] x86-64 register set loaded in 0ms\n"
[ERROR][2025-11-22 00:20:37] .../vim/lsp/rpc.lua:734	"rpc"	"/home/elli0t43/.local/share/nvim/mason/bin/asm-lsp"	"stderr"	"INFO [asm_lsp] Gas directive set loaded in 0ms\n"
[ERROR][2025-11-22 00:20:37] .../vim/lsp/rpc.lua:734	"rpc"	"/home/elli0t43/.local/share/nvim/mason/bin/asm-lsp"	"stderr"	"WARN [asm_lsp::lsp] Failed to detect project root\nINFO [asm_lsp] Loaded compile commands: []\n"
[ERROR][2025-11-22 00:20:37] .../vim/lsp/rpc.lua:734	"rpc"	"/home/elli0t43/.local/share/nvim/mason/bin/asm-lsp"	"stderr"	'INFO [asm_lsp::lsp] Include directory map: {All: ["/usr/local/include", "/usr/include/c++/14", "/usr/include/c++/14/backward", "/usr/include/x86_64-linux-gnu/c++/13", "/usr/include/x86_64-linux-gnu/c++/14", "/usr/include/c++/13", "/usr/include/x86_64-linux-gnu", "/usr/include/c++/13/backward", "/usr/lib/llvm-16/lib/clang/16/include", "/usr/lib/gcc/x86_64-linux-gnu/13/include", "/usr/include"]}\nINFO [asm_lsp] Starting asm_lsp loop...\n'
[ERROR][2025-11-22 00:20:37] .../vim/lsp/rpc.lua:734	"rpc"	"/home/elli0t43/.local/share/nvim/mason/bin/asm-lsp"	"stderr"	"INFO [asm_lsp] Did open text document notification serviced in 2ms\n"
[DEBUG][2025-11-22 00:20:38] .../vim/lsp/rpc.lua:284	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didSave",  params = {    textDocument = {      uri = "file:///home/elli0t43/Documents/asm/test.s"    }  }}
[ERROR][2025-11-22 00:20:38] .../vim/lsp/rpc.lua:734	"rpc"	"/home/elli0t43/.local/share/nvim/mason/bin/asm-lsp"	"stderr"	"INFO [asm_lsp::handle] No applicable user-provided commands for /home/elli0t43/Documents/asm/test.s. Applying default compile command\n"
[ERROR][2025-11-22 00:20:38] .../vim/lsp/rpc.lua:734	"rpc"	"/home/elli0t43/.local/share/nvim/mason/bin/asm-lsp"	"stderr"	"INFO [asm_lsp] Published diagnostics on save in 18ms\n"
[DEBUG][2025-11-22 00:20:38] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = { {        message = "Error: no such instruction: `section .text'",        range = {          ["end"] = {            character = 0,            line = 0          },          start = {            character = 0,            line = 0          }        }      }, {        message = "Error: no such instruction: `global main'",        range = {          ["end"] = {            character = 0,            line = 1          },          start = {            character = 0,            line = 1          }        }      }, {        message = "Error: no such instruction: `write your code here'",        range = {          ["end"] = {            character = 0,            line = 3          },          start = {            character = 0,            line = 3          }        }      }, {        message = "Error: expecting operand after ','; got nothing",        range = {          ["end"] = {            character = 0,            line = 4          },          start = {            character = 0,            line = 4          }        }      }, {        message = "Error: operand size mismatch for `mov'",        range = {          ["end"] = {            character = 0,            line = 6          },          start = {            character = 0,            line = 6          }        }      } },    uri = "file:///home/elli0t43/Documents/asm/test.s"  }}
[DEBUG][2025-11-22 00:20:38] .../vim/lsp/rpc.lua:284	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didSave",  params = {    textDocument = {      uri = "file:///home/elli0t43/Documents/asm/test.s"    }  }}
[ERROR][2025-11-22 00:20:38] .../vim/lsp/rpc.lua:734	"rpc"	"/home/elli0t43/.local/share/nvim/mason/bin/asm-lsp"	"stderr"	"INFO [asm_lsp::handle] No applicable user-provided commands for /home/elli0t43/Documents/asm/test.s. Applying default compile command\n"
[ERROR][2025-11-22 00:20:38] .../vim/lsp/rpc.lua:734	"rpc"	"/home/elli0t43/.local/share/nvim/mason/bin/asm-lsp"	"stderr"	"INFO [asm_lsp] Published diagnostics on save in 4ms\n"
[DEBUG][2025-11-22 00:20:38] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = { {        message = "Error: no such instruction: `section .text'",        range = {          ["end"] = {            character = 0,            line = 0          },          start = {            character = 0,            line = 0          }        }      }, {        message = "Error: no such instruction: `global main'",        range = {          ["end"] = {            character = 0,            line = 1          },          start = {            character = 0,            line = 1          }        }      }, {        message = "Error: no such instruction: `write your code here'",        range = {          ["end"] = {            character = 0,            line = 3          },          start = {            character = 0,            line = 3          }        }      }, {        message = "Error: expecting operand after ','; got nothing",        range = {          ["end"] = {            character = 0,            line = 4          },          start = {            character = 0,            line = 4          }        }      }, {        message = "Error: operand size mismatch for `mov'",        range = {          ["end"] = {            character = 0,            line = 6          },          start = {            character = 0,            line = 6          }        }      } },    uri = "file:///home/elli0t43/Documents/asm/test.s"  }}
[DEBUG][2025-11-22 00:20:38] .../vim/lsp/rpc.lua:284	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didSave",  params = {    textDocument = {      uri = "file:///home/elli0t43/Documents/asm/test.s"    }  }}
[ERROR][2025-11-22 00:20:38] .../vim/lsp/rpc.lua:734	"rpc"	"/home/elli0t43/.local/share/nvim/mason/bin/asm-lsp"	"stderr"	"INFO [asm_lsp::handle] No applicable user-provided commands for /home/elli0t43/Documents/asm/test.s. Applying default compile command\n"
[ERROR][2025-11-22 00:20:38] .../vim/lsp/rpc.lua:734	"rpc"	"/home/elli0t43/.local/share/nvim/mason/bin/asm-lsp"	"stderr"	"INFO [asm_lsp] Published diagnostics on save in 5ms\n"
[DEBUG][2025-11-22 00:20:38] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = { {        message = "Error: no such instruction: `section .text'",        range = {          ["end"] = {            character = 0,            line = 0          },          start = {            character = 0,            line = 0          }        }      }, {        message = "Error: no such instruction: `global main'",        range = {          ["end"] = {            character = 0,            line = 1          },          start = {            character = 0,            line = 1          }        }      }, {        message = "Error: no such instruction: `write your code here'",        range = {          ["end"] = {            character = 0,            line = 3          },          start = {            character = 0,            line = 3          }        }      }, {        message = "Error: expecting operand after ','; got nothing",        range = {          ["end"] = {            character = 0,            line = 4          },          start = {            character = 0,            line = 4          }        }      }, {        message = "Error: operand size mismatch for `mov'",        range = {          ["end"] = {            character = 0,            line = 6          },          start = {            character = 0,            line = 6          }        }      } },    uri = "file:///home/elli0t43/Documents/asm/test.s"  }}
[INFO][2025-11-22 00:20:42] .../lua/vim/lsp.lua:1875	"exit_handler"	{ {    _on_attach = <function 1>,    attached_buffers = {      [4] = true    },    cancel_request = <function 2>,    commands = {},    config = {      autostart = true,      capabilities = {        textDocument = {          callHierarchy = {            dynamicRegistration = false          },          codeAction = {            codeActionLiteralSupport = {              codeActionKind = {                valueSet = { "", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" }              }            },            dataSupport = true,            dynamicRegistration = false,            isPreferredSupport = true,            resolveSupport = {              properties = { "edit" }            }          },          completion = {            completionItem = {              commitCharactersSupport = true,              deprecatedSupport = true,              documentationFormat = { "markdown", "plaintext" },              insertReplaceSupport = true,              insertTextModeSupport = {                valueSet = { 1, 2 }              },              labelDetailsSupport = true,              preselectSupport = true,              resolveSupport = {                properties = { "documentation", "detail", "additionalTextEdits", "sortText", "filterText", "insertText", "textEdit", "insertTextFormat", "insertTextMode" }              },              snippetSupport = true,              tagSupport = {                valueSet = { 1 }              }            },            completionItemKind = {              valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 }            },            completionList = {              itemDefaults = { "commitCharacters", "editRange", "insertTextFormat", "insertTextMode", "data" }            },            contextSupport = true,            dynamicRegistration = false,            insertTextMode = 1          },          declaration = {            linkSupport = true          },          definition = {            linkSupport = true          },          documentHighlight = {            dynamicRegistration = false          },          documentSymbol = {            dynamicRegistration = false,            hierarchicalDocumentSymbolSupport = true,            symbolKind = {              valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }            }          },          hover = {            contentFormat = { "markdown", "plaintext" },            dynamicRegistration = false          },          implementation = {            linkSupport = true          },          publishDiagnostics = {            relatedInformation = true,            tagSupport = {              valueSet = { 1, 2 }            }          },          references = {            dynamicRegistration = false          },          rename = {            dynamicRegistration = false,            prepareSupport = true          },          semanticTokens = {            augmentsSyntaxTokens = true,            dynamicRegistration = false,            formats = { "relative" },            multilineTokenSupport = false,            overlappingTokenSupport = true,            requests = {              full = {                delta = true              },              range = false            },            serverCancelSupport = false,            tokenModifiers = { "declaration", "definition", "readonly", "static", "deprecated", "abstract", "async", "modification", "documentation", "defaultLibrary" },            tokenTypes = { "namespace", "type", "class", "enum", "interface", "struct", "typeParameter", "parameter", "variable", "property", "enumMember", "event", "function", "method", "macro", "keyword", "modifier", "comment", "string", "number", "regexp", "operator", "decorator" }          },          signatureHelp = {            dynamicRegistration = false,            signatureInformation = {              activeParameterSupport = true,              documentationFormat = { "markdown", "plaintext" },              parameterInformation = {                labelOffsetSupport = true              }            }          },          synchronization = {            didSave = true,            dynamicRegistration = false,            willSave = true,            willSaveWaitUntil = true          },          typeDefinition = {            linkSupport = true          }        },        window = {          showDocument = {            support = true          },          showMessage = {            messageActionItem = {              additionalPropertiesSupport = false            }          },          workDoneProgress = true        },        workspace = {          applyEdit = true,          configuration = true,          didChangeWatchedFiles = {            dynamicRegistration = false,            relativePatternSupport = true          },          semanticTokens = {            refreshSupport = true          },          symbol = {            dynamicRegistration = false,            hierarchicalWorkspaceSymbolSupport = true,            symbolKind = {              valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }            }          },          workspaceEdit = {            resourceOperations = { "rename", "create", "delete" }          },          workspaceFolders = true        }      },      cmd = { "/home/elli0t43/.local/share/nvim/mason/bin/asm-lsp" },      cmd_cwd = "/home/elli0t43/Documents/asm",      filetypes = { "asm", "vmasm", "nasm", "s", "S" },      flags = {},      get_language_id = <function 3>,      handlers = <1>{},      init_options = vim.empty_dict(),      log_level = 2,      message_level = 2,      name = "asm_lsp",      on_attach = <function 4>,      on_exit = <function 5>,      on_init = <function 6>,      settings = {        asm = {          syntax = "nasm"        },        nasm = {          syntax = "nasm"        }      },      single_file_support = true,      <metatable> = <2>{        __tostring = <function 7>      }    },    handlers = <table 1>,    id = 1,    initialized = true,    is_stopped = <function 8>,    messages = {      messages = {},      name = "asm_lsp",      progress = {},      status = {}    },    name = "asm_lsp",    notify = <function 9>,    offset_encoding = "utf-16",    request = <function 10>,    request_sync = <function 11>,    requests = {},    rpc = {      is_closing = <function 12>,      notify = <function 13>,      request = <function 14>,      terminate = <function 15>    },    server_capabilities = {      completionProvider = {        completionItem = {          labelDetailsSupport = true        },        triggerCharacters = { "%", "." }      },      definitionProvider = true,      diagnosticProvider = {        identifier = "asm-lsp",        interFileDependencies = true,        workspaceDiagnostics = false      },      documentSymbolProvider = true,      hoverProvider = true,      positionEncoding = "utf-16",      referencesProvider = true,      signatureHelpProvider = {        workDoneProgress = false      },      textDocumentSync = {        change = 2,        openClose = true,        save = {          includeText = false        },        willSave = false,        willSaveWaitUntil = false      }    },    stop = <function 16>,    supports_method = <function 17>,    workspace_did_change_configuration = <function 18>  } }
[DEBUG][2025-11-22 00:20:42] .../vim/lsp/rpc.lua:284	"rpc.send"	{  id = 2,  jsonrpc = "2.0",  method = "shutdown"}
[DEBUG][2025-11-22 00:20:42] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  id = 2,  jsonrpc = "2.0"}
[DEBUG][2025-11-22 00:20:42] .../vim/lsp/rpc.lua:284	"rpc.send"	{  jsonrpc = "2.0",  method = "exit"}

Windows

[START][2024-11-22 00:18:26] LSP logging initiated
[INFO][2024-11-22 00:18:26] .../lua/vim/lsp.lua:799	"exit_handler"	{}
[START][2024-11-22 00:18:32] LSP logging initiated
[INFO][2024-11-22 00:18:32] .../vim/lsp/rpc.lua:731	"Starting RPC client"	{  cmd = { "C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD" },  extra = {    cwd = "C:/Users/elli0t43/Desktop/testasm"  }}
[DEBUG][2024-11-22 00:18:32] .../vim/lsp/rpc.lua:286	"rpc.send"	{  id = 1,  jsonrpc = "2.0",  method = "initialize",  params = {    capabilities = {      general = {        positionEncodings = { "utf-16" }      },      textDocument = {        callHierarchy = {          dynamicRegistration = false        },        codeAction = {          codeActionLiteralSupport = {            codeActionKind = {              valueSet = { "", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" }            }          },          dataSupport = true,          dynamicRegistration = true,          isPreferredSupport = true,          resolveSupport = {            properties = { "edit" }          }        },        completion = {          completionItem = {            commitCharactersSupport = true,            deprecatedSupport = true,            documentationFormat = { "markdown", "plaintext" },            insertReplaceSupport = true,            insertTextModeSupport = {              valueSet = { 1, 2 }            },            labelDetailsSupport = true,            preselectSupport = true,            resolveSupport = {              properties = { "documentation", "detail", "additionalTextEdits", "sortText", "filterText", "insertText", "textEdit", "insertTextFormat", "insertTextMode" }            },            snippetSupport = true,            tagSupport = {              valueSet = { 1 }            }          },          completionItemKind = {            valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 }          },          completionList = {            itemDefaults = { "commitCharacters", "editRange", "insertTextFormat", "insertTextMode", "data" }          },          contextSupport = true,          dynamicRegistration = false,          insertTextMode = 1        },        declaration = {          linkSupport = true        },        definition = {          dynamicRegistration = true,          linkSupport = true        },        diagnostic = {          dynamicRegistration = false        },        documentHighlight = {          dynamicRegistration = false        },        documentSymbol = {          dynamicRegistration = false,          hierarchicalDocumentSymbolSupport = true,          symbolKind = {            valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }          }        },        formatting = {          dynamicRegistration = true        },        hover = {          contentFormat = { "markdown", "plaintext" },          dynamicRegistration = true        },        implementation = {          linkSupport = true        },        inlayHint = {          dynamicRegistration = true,          resolveSupport = {            properties = { "textEdits", "tooltip", "location", "command" }          }        },        publishDiagnostics = {          dataSupport = true,          relatedInformation = true,          tagSupport = {            valueSet = { 1, 2 }          }        },        rangeFormatting = {          dynamicRegistration = true        },        references = {          dynamicRegistration = false        },        rename = {          dynamicRegistration = true,          prepareSupport = true        },        semanticTokens = {          augmentsSyntaxTokens = true,          dynamicRegistration = false,          formats = { "relative" },          multilineTokenSupport = false,          overlappingTokenSupport = true,          requests = {            full = {              delta = true            },            range = false          },          serverCancelSupport = false,          tokenModifiers = { "declaration", "definition", "readonly", "static", "deprecated", "abstract", "async", "modification", "documentation", "defaultLibrary" },          tokenTypes = { "namespace", "type", "class", "enum", "interface", "struct", "typeParameter", "parameter", "variable", "property", "enumMember", "event", "function", "method", "macro", "keyword", "modifier", "comment", "string", "number", "regexp", "operator", "decorator" }        },        signatureHelp = {          dynamicRegistration = false,          signatureInformation = {            activeParameterSupport = true,            documentationFormat = { "markdown", "plaintext" },            parameterInformation = {              labelOffsetSupport = true            }          }        },        synchronization = {          didSave = true,          dynamicRegistration = false,          willSave = true,          willSaveWaitUntil = true        },        typeDefinition = {          linkSupport = true        }      },      window = {        showDocument = {          support = true        },        showMessage = {          messageActionItem = {            additionalPropertiesSupport = false          }        },        workDoneProgress = true      },      workspace = {        applyEdit = true,        configuration = true,        didChangeConfiguration = {          dynamicRegistration = false        },        didChangeWatchedFiles = {          dynamicRegistration = true,          relativePatternSupport = true        },        inlayHint = {          refreshSupport = true        },        semanticTokens = {          refreshSupport = true        },        symbol = {          dynamicRegistration = false,          symbolKind = {            valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }          }        },        workspaceEdit = {          resourceOperations = { "rename", "create", "delete" }        },        workspaceFolders = true      }    },    clientInfo = {      name = "Neovim",      version = "0.10.1+g7e194f0d0"    },    initializationOptions = vim.empty_dict(),    processId = 24224,    rootPath = vim.NIL,    rootUri = vim.NIL,    trace = "off",    workDoneToken = "1",    workspaceFolders = vim.NIL  }}
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp] Starting asm-lsp-0.9.0\n"
[DEBUG][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:408	"rpc.receive"	{  id = 1,  jsonrpc = "2.0",  result = {    capabilities = {      completionProvider = {        completionItem = {          labelDetailsSupport = true        },        triggerCharacters = { "%", "." }      },      definitionProvider = true,      diagnosticProvider = {        identifier = "asm-lsp",        interFileDependencies = true,        workspaceDiagnostics = false      },      documentSymbolProvider = true,      hoverProvider = true,      positionEncoding = "utf-16",      referencesProvider = true,      signatureHelpProvider = {        workDoneProgress = false      },      textDocumentSync = 2    }  }}
[DEBUG][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:286	"rpc.send"	{  jsonrpc = "2.0",  method = "initialized",  params = vim.empty_dict()}
[DEBUG][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:286	"rpc.send"	{  jsonrpc = "2.0",  method = "workspace/didChangeConfiguration",  params = {    settings = {      asm = {        syntax = "nasm"      },      nasm = {        syntax = "nasm"      }    }  }}
[DEBUG][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:286	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didOpen",  params = {    textDocument = {      languageId = "asm",      text = "section .text\r\n    global main\r\nmain:\r\n        ;write your code here\r\n        xor eax,,,,,1\r\n        mov ecx, 2\r\n        ret\r\n\r\n",      uri = "file:///C:/Users/elli0t43/Desktop/testasm/test.s",      version = 0    }  }}
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	'INFO [asm_lsp] Client initialization params: InitializeParams { process_id: Some(24224), root_path: None, root_uri: None, initialization_options: Some(Object {}), capabilities: ClientCapabilities { workspace: Some(WorkspaceClientCapabilities { apply_edit: Some(true), workspace_edit: Some(WorkspaceEditClientCapabilities { document_changes: None, resource_operations: Some([Rename, Create, Delete]), failure_handling: None, normalizes_line_endings: None, change_annotation_support: None }), did_change_configuration: Some(DynamicRegistrationClientCapabilities { dynamic_registration: Some(false) }), did_change_watched_files: Some(DidChangeWatchedFilesClientCapabilities { dynamic_registration: Some(true), relative_pattern_support: Some(true) }), symbol: Some(WorkspaceSymbolClientCapabilities { dynamic_registration: Some(false), symbol_kind: Some(SymbolKindCapability { value_set: Some([File, Module, Namespace, Package, Class, Method, Property, Field, Constructor, Enum, Interface, Function, Variable, Constant, String, Number, Boolean, Array, Object, Key, Null, EnumMember, Struct, Event, Operator, TypeParameter]) }), tag_support: None, resolve_support: None }), execute_command: None, workspace_folders: Some(true), configuration: Some(true), semantic_tokens: Some(SemanticTokensWorkspaceClientCapabilities { refresh_support: Some(true) }), code_lens: None, file_operations: None, inline_value: None, inlay_hint: Some(InlayHintWorkspaceClientCapabilities { refresh_support: Some(true) }), diagnostic: None }), text_document: Some(TextDocumentClientCapabilities { synchronization: Some(TextDocumentSyncClientCapabilities { dynamic_registration: Some(false), will_save: Some(true), will_save_wait_until: Some(true), did_save: Some(true) }), completion: Some(CompletionClientCapabilities { dynamic_registration: Some(false), completion_item: Some(CompletionItemCapability { snippet_support: Some(true), commit_characters_support: Some(true), documentation_format: Some([Markdown, PlainText]), deprecated_support: Some(true), preselect_support: Some(true), tag_support: Some(TagSupport { value_set: [Deprecated] }), insert_replace_support: Some(true), resolve_support: Some(CompletionItemCapabilityResolveSupport { properties: ["documentation", "detail", "additionalTextEdits", "sortText", "filterText", "insertText", "textEdit", "insertTextFormat", "insertTextMode"] }), insert_text_mode_support: Some(InsertTextModeSupport { value_set: [AsIs, AdjustIndentation] }), label_details_support: Some(true) }), completion_item_kind: Some(CompletionItemKindCapability { value_set: Some([Text, Method, Function, Constructor, Field, Variable, Class, Interface, Module, Property, Unit, Value, Enum, Keyword, Snippet, Color, File, Reference, Folder, EnumMember, Constant, Struct, Event, Operator, TypeParameter]) }), context_support: Some(true), insert_text_mode: Some(AsIs), completion_list: Some(CompletionListCapability { item_defaults: Some(["commitCharacters", "editRange", "insertTextFormat", "insertTextMode", "data"]) }) }), hover: Some(HoverClientCapabilities { dynamic_registration: Some(true), content_format: Some([Markdown, PlainText]) }), signature_help: Some(SignatureHelpClientCapabilities { dynamic_registration: Some(false), signature_information: Some(SignatureInformationSettings { documentation_format: Some([Markdown, PlainText]), parameter_information: Some(ParameterInformationSettings { label_offset_support: Some(true) }), active_parameter_support: Some(true) }), context_support: None }), references: Some(DynamicRegistrationClientCapabilities { dynamic_registration: Some(false) }), document_highlight: Some(DynamicRegistrationClientCapabilities { dynamic_registration: Some(false) }), document_symbol: Some(DocumentSymbolClientCapabilities { dynamic_registration: Some(false), symbol_kind: Some(SymbolKindCapability { value_set: Some([File, Module, Namespace, Package, Class, Method, Property, Field, Constructor, Enum, Interface, Function, Variable, Constant, String, Number, Boolean, Array, Object, Key, Null, EnumMember, Struct, Event, Operator, TypeParameter]) }), hierarchical_document_symbol_support: Some(true), tag_support: None }), formatting: Some(DynamicRegistrationClientCapabilities { dynamic_registration: Some(true) }), range_formatting: Some(DynamicRegistrationClientCapabilities { dynamic_registration: Some(true) }), on_type_formatting: None, declaration: Some(GotoCapability { dynamic_registration: None, link_support: Some(true) }), definition: Some(GotoCapability { dynamic_registration: Some(true), link_support: Some(true) }), type_definition: Some(GotoCapability { dynamic_registration: None, link_support: Some(true) }), implementation: Some(GotoCapability { dynamic_registration: None, link_support: Some(true) }), code_action: Some(CodeActionClientCapabilities { dynamic_registration: Some(true), code_action_literal_support: Some(CodeActionLiteralSupport { code_action_kind: CodeActionKindLiteralSupport { value_set: ["", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports"] } }), is_preferred_support: Some(true), disabled_support: None, data_support: Some(true), resolve_support: Some(CodeActionCapabilityResolveSupport { properties: ["edit"] }), honors_change_annotations: None }), code_lens: None, document_link: None, color_provider: None, rename: Some(RenameClientCapabilities { dynamic_registration: Some(true), prepare_support: Some(true), prepare_support_default_behavior: None, honors_change_annotations: None }), publish_diagnostics: Some(PublishDiagnosticsClientCapabilities { related_information: Some(true), tag_support: Some(TagSupport { value_set: [Unnecessary, Deprecated] }), version_support: None, code_description_support: None, data_support: Some(true) }), folding_range: None, selection_range: None, linked_editing_range: None, call_hierarchy: Some(DynamicRegistrationClientCapabilities { dynamic_registration: Some(false) }), semantic_tokens: Some(SemanticTokensClientCapabilities { dynamic_registration: Some(false), requests: SemanticTokensClientCapabilitiesRequests { range: Some(false), full: Some(Delta { delta: Some(true) }) }, token_types: [SemanticTokenType("namespace"), SemanticTokenType("type"), SemanticTokenType("class"), SemanticTokenType("enum"), SemanticTokenType("interface"), SemanticTokenType("struct"), SemanticTokenType("typeParameter"), SemanticTokenType("parameter"), SemanticTokenType("variable"), SemanticTokenType("property"), SemanticTokenType("enumMember"), SemanticTokenType("event"), SemanticTokenType("function"), SemanticTokenType("method"), SemanticTokenType("macro"), SemanticTokenType("keyword"), SemanticTokenType("modifier"), SemanticTokenType("comment"), SemanticTokenType("string"), SemanticTokenType("number"), SemanticTokenType("regexp"), SemanticTokenType("operator"), SemanticTokenType("decorator")], token_modifiers: [SemanticTokenModifier("declaration"), SemanticTokenModifier("definition"), SemanticTokenModifier("readonly"), SemanticTokenModifier("static"), SemanticTokenModifier("deprecated"), SemanticTokenModifier("abstract"), SemanticTokenModifier("async"), SemanticTokenModifier("modification"), SemanticTokenModifier("documentation"), SemanticTokenModifier("defaultLibrary")], formats: [TokenFormat("relative")], overlapping_token_support: Some(true), multiline_token_support: Some(false), server_cancel_support: Some(false), augments_syntax_tokens: Some(true) }), moniker: None, type_hierarchy: None, inline_value: None, inlay_hint: Some(InlayHintClientCapabilities { dynamic_registration: Some(true), resolve_support: Some(InlayHintResolveClientCapabilities { properties: ["textEdits", "tooltip", "location", "command"] }) }), diagnostic: Some(DiagnosticClientCapabilities { dynamic_registration: Some(false), related_document_support: None }) }), notebook_document: None, window: Some(WindowClientCapabilities { work_done_progress: Some(true), show_message: Some(ShowMessageRequestClientCapabilities { message_action_item: Some(MessageActionItemCapabilities { additional_properties_support: Some(false) }) }), show_document: Some(ShowDocumentClientCapabilities { support: true }) }), general: Some(GeneralClientCapabilities { regular_expressions: None, markdown: None, stale_request_support: None, position_encodings: Some([PositionEncodingKind("utf-16")]) }), experimental: None }, trace: Some(Off), workspace_folders: None, client_info: Some(ClientInfo { name: "Neovim", version: Some("0.10.1+g7e194f0d0") }), locale: None, work_done_progress_params: WorkDoneProgressParams { work_done_token: Some(String("1")) } }\n'
[INFO][2024-11-22 00:18:33] ...m/lsp/client.lua:620	"LSP[asm_lsp]"	"server_capabilities"	{  server_capabilities = {    completionProvider = {      completionItem = {        labelDetailsSupport = true      },      triggerCharacters = { "%", "." }    },    definitionProvider = true,    diagnosticProvider = {      identifier = "asm-lsp",      interFileDependencies = true,      workspaceDiagnostics = false    },    documentSymbolProvider = true,    hoverProvider = true,    positionEncoding = "utf-16",    referencesProvider = true,    signatureHelpProvider = {      workDoneProgress = false    },    textDocumentSync = {      change = 2,      openClose = true,      save = {        includeText = false      },      willSave = false,      willSaveWaitUntil = false    }  }}
[DEBUG][2024-11-22 00:18:33] ...m/lsp/client.lua:678	"LSP[asm_lsp]"	"client.request"	1	"textDocument/diagnostic"	{  range = {    ["end"] = {      character = 0,      line = 8    },    start = {      character = 0,      line = 0    }  },  textDocument = {    uri = "file:///C:/Users/elli0t43/Desktop/testasm/test.s"  }}	<function 1>	4
[DEBUG][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:286	"rpc.send"	{  id = 2,  jsonrpc = "2.0",  method = "textDocument/diagnostic",  params = {    range = {      ["end"] = {        character = 0,        line = 8      },      start = {        character = 0,        line = 0      }    },    textDocument = {      uri = "file:///C:/Users/elli0t43/Desktop/testasm/test.s"    }  }}
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::lsp] Creating directories along C:\\Users\\elli0t43\\AppData\\Roaming\\asm-lsp as necessary...\n"
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::lsp] Parsing global asm-lsp config from file -> C:\\Users\\elli0t43\\AppData\\Roaming\\asm-lsp\\.asm-lsp.toml\nWARN [asm_lsp::lsp] Failed to detect project root\nINFO [asm_lsp::types] Detected host arch as x86-64\n"
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	'INFO [asm_lsp] Server Configuration: RootConfig { default_config: Some(Config { version: Some("0.9.0"), assembler: Nasm, instruction_set: X86_AND_X86_64, opts: Some(ConfigOptions { compiler: Some("gcc"), compile_flags_txt: Some(["-g"]), diagnostics: Some(true), default_diagnostics: Some(false) }), client: None }), projects: None }\n'
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::types] x86 instruction set loaded in 5ms\n"
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::types] x86-64 instruction set loaded in 4ms\n"
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::types] x86 register set loaded in 0ms\n"
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::types] x86-64 register set loaded in 0ms\n"
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::types] nasm directive set loaded in 0ms\n"
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"WARN [asm_lsp::lsp] Failed to detect project root\n"
[DEBUG][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:286	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didSave",  params = {    textDocument = {      uri = "file:///C:/Users/elli0t43/Desktop/testasm/test.s"    }  }}
[DEBUG][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:286	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didSave",  params = {    textDocument = {      uri = "file:///C:/Users/elli0t43/Desktop/testasm/test.s"    }  }}
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::lsp] Include directory map: {All: []}\nINFO [asm_lsp] Starting asm-lsp loop...\n"
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	'WARN [asm_lsp::handle] Invalid notification format: "workspace/didChangeConfiguration"\n'
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::handle] textDocument/didOpen notification serviced in 0ms\n"
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"WARN [asm_lsp::types] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.s, using /C:/Users/elli0t43/Desktop/testasm/test.s\n"
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::types] Selected root config\nERROR [asm_lsp::lsp] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.s, using /C:/Users/elli0t43/Desktop/testasm/test.s\n"
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	'WARN [asm_lsp::types] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.s, using /C:/Users/elli0t43/Desktop/testasm/test.s\nINFO [asm_lsp::types] Selected root config\nINFO [asm_lsp::handle] Selected compile command(s) for request: [\n    CompileCommand {\n        directory: "",\n        file: File(\n            "/C:/Users/elli0t43/Desktop/testasm/test.s",\n        ),\n        arguments: Some(\n            Arguments(\n                [\n                    "gcc",\n                    "-g",\n                    "/C:/Users/elli0t43/Desktop/testasm/test.s",\n                ],\n            ),\n        ),\n        command: None,\n        output: None,\n    },\n]\n'
[DEBUG][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:408	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///C:/Users/elli0t43/Desktop/testasm/test.s"  }}
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	'INFO [asm_lsp::handle] textDocument/diagnostic request serviced in 0ms\nWARN [asm_lsp::types] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.s, using /C:/Users/elli0t43/Desktop/testasm/test.s\nINFO [asm_lsp::types] Selected root config\nERROR [asm_lsp::lsp] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.s, using /C:/Users/elli0t43/Desktop/testasm/test.s\nWARN [asm_lsp::types] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.s, using /C:/Users/elli0t43/Desktop/testasm/test.s\nINFO [asm_lsp::types] Selected root config\nINFO [asm_lsp::handle] Selected compile command(s) for request: [\n    CompileCommand {\n        directory: "",\n        file: File(\n            "/C:/Users/elli0t43/Desktop/testasm/test.s",\n        ),\n        arguments: Some(\n            Arguments(\n                [\n                    "gcc",\n                    "-g",\n                    "/C:/Users/elli0t43/Desktop/testasm/test.s",\n                ],\n            ),\n        ),\n        command: None,\n        output: None,\n    },\n]\nINFO [asm_lsp::handle] Published diagnostics on save in 0ms\n'
[DEBUG][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:408	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///C:/Users/elli0t43/Desktop/testasm/test.s"  }}
[DEBUG][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:408	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///C:/Users/elli0t43/Desktop/testasm/test.s"  }}
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	'WARN [asm_lsp::types] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.s, using /C:/Users/elli0t43/Desktop/testasm/test.s\nINFO [asm_lsp::types] Selected root config\nERROR [asm_lsp::lsp] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.s, using /C:/Users/elli0t43/Desktop/testasm/test.s\nWARN [asm_lsp::types] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.s, using /C:/Users/elli0t43/Desktop/testasm/test.s\nINFO [asm_lsp::types] Selected root config\nINFO [asm_lsp::handle] Selected compile command(s) for request: [\n    CompileCommand {\n        directory: "",\n        file: File(\n            "/C:/Users/elli0t43/Desktop/testasm/test.s",\n        ),\n        arguments: Some(\n            Arguments(\n                [\n                    "gcc",\n                    "-g",\n                    "/C:/Users/elli0t43/Desktop/testasm/test.s",\n                ],\n            ),\n        ),\n        command: None,\n        output: None,\n    },\n]\nINFO [asm_lsp::handle] Published diagnostics on save in 0ms\n'
[DEBUG][2024-11-22 00:18:34] .../vim/lsp/rpc.lua:286	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didOpen",  params = {    textDocument = {      languageId = "asm",      text = "section .text\r\n    global main\r\nmain:\r\n        ;write your code here\r\n        xor eax,,,1\r\n        \r\n        mov ecx, 2\r\n        ret\r\n\r\n",      uri = "file:///C:/Users/elli0t43/Desktop/testasm/test.asm",      version = 0    }  }}
[ERROR][2024-11-22 00:18:34] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::handle] textDocument/didOpen notification serviced in 0ms\n"
[DEBUG][2024-11-22 00:18:34] ...m/lsp/client.lua:678	"LSP[asm_lsp]"	"client.request"	1	"textDocument/diagnostic"	{  range = {    ["end"] = {      character = 0,      line = 9    },    start = {      character = 0,      line = 0    }  },  textDocument = {    uri = "file:///C:/Users/elli0t43/Desktop/testasm/test.asm"  }}	<function 1>	6
[DEBUG][2024-11-22 00:18:34] .../vim/lsp/rpc.lua:286	"rpc.send"	{  id = 3,  jsonrpc = "2.0",  method = "textDocument/diagnostic",  params = {    range = {      ["end"] = {        character = 0,        line = 9      },      start = {        character = 0,        line = 0      }    },    textDocument = {      uri = "file:///C:/Users/elli0t43/Desktop/testasm/test.asm"    }  }}
[ERROR][2024-11-22 00:18:34] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	'WARN [asm_lsp::types] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.asm, using /C:/Users/elli0t43/Desktop/testasm/test.asm\nINFO [asm_lsp::types] Selected root config\nERROR [asm_lsp::lsp] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.asm, using /C:/Users/elli0t43/Desktop/testasm/test.asm\nWARN [asm_lsp::types] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.asm, using /C:/Users/elli0t43/Desktop/testasm/test.asm\nINFO [asm_lsp::types] Selected root config\nINFO [asm_lsp::handle] Selected compile command(s) for request: [\n    CompileCommand {\n        directory: "",\n        file: File(\n            "/C:/Users/elli0t43/Desktop/testasm/test.asm",\n        ),\n        arguments: Some(\n            Arguments(\n                [\n                    "gcc",\n                    "-g",\n                    "/C:/Users/elli0t43/Desktop/testasm/test.asm",\n                ],\n            ),\n        ),\n        command: None,\n        output: None,\n    },\n]\nINFO [asm_lsp::handle] textDocument/diagnostic request serviced in 0ms\n'
[DEBUG][2024-11-22 00:18:34] .../vim/lsp/rpc.lua:408	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///C:/Users/elli0t43/Desktop/testasm/test.asm"  }}
[DEBUG][2024-11-22 00:18:34] .../vim/lsp/rpc.lua:286	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didSave",  params = {    textDocument = {      uri = "file:///C:/Users/elli0t43/Desktop/testasm/test.asm"    }  }}
[ERROR][2024-11-22 00:18:34] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	'WARN [asm_lsp::types] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.asm, using /C:/Users/elli0t43/Desktop/testasm/test.asm\nINFO [asm_lsp::types] Selected root config\nERROR [asm_lsp::lsp] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.asm, using /C:/Users/elli0t43/Desktop/testasm/test.asm\nWARN [asm_lsp::types] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.asm, using /C:/Users/elli0t43/Desktop/testasm/test.asm\nINFO [asm_lsp::types] Selected root config\nINFO [asm_lsp::handle] Selected compile command(s) for request: [\n    CompileCommand {\n        directory: "",\n        file: File(\n            "/C:/Users/elli0t43/Desktop/testasm/test.asm",\n        ),\n        arguments: Some(\n            Arguments(\n                [\n                    "gcc",\n                    "-g",\n                    "/C:/Users/elli0t43/Desktop/testasm/test.asm",\n                ],\n            ),\n        ),\n        command: None,\n        output: None,\n    },\n]\n'
[ERROR][2024-11-22 00:18:34] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::handle] Published diagnostics on save in 0ms\n"
[DEBUG][2024-11-22 00:18:34] .../vim/lsp/rpc.lua:408	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///C:/Users/elli0t43/Desktop/testasm/test.asm"  }}

What I found

I believe this is the reason why its not working on windows

[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	"INFO [asm_lsp::types] Selected root config\nERROR [asm_lsp::lsp] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.s, using /C:/Users/elli0t43/Desktop/testasm/test.s\n"
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	'WARN [asm_lsp::types] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.s, using /C:/Users/elli0t43/Desktop/testasm/test.s\nINFO [asm_lsp::types] Selected root config\nINFO [asm_lsp::handle] Selected compile command(s) for request: [\n    CompileCommand {\n        directory: "",\n        file: File(\n            "/C:/Users/elli0t43/Desktop/testasm/test.s",\n        ),\n        arguments: Some(\n            Arguments(\n                [\n                    "gcc",\n                    "-g",\n                    "/C:/Users/elli0t43/Desktop/testasm/test.s",\n                ],\n            ),\n        ),\n        command: None,\n        output: None,\n    },\n]\n'
[DEBUG][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:408	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///C:/Users/elli0t43/Desktop/testasm/test.s"  }}
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	'INFO [asm_lsp::handle] textDocument/diagnostic request serviced in 0ms\nWARN [asm_lsp::types] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.s, using /C:/Users/elli0t43/Desktop/testasm/test.s\nINFO [asm_lsp::types] Selected root config\nERROR [asm_lsp::lsp] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.s, using /C:/Users/elli0t43/Desktop/testasm/test.s\nWARN [asm_lsp::types] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.s, using /C:/Users/elli0t43/Desktop/testasm/test.s\nINFO [asm_lsp::types] Selected root config\nINFO [asm_lsp::handle] Selected compile command(s) for request: [\n    CompileCommand {\n        directory: "",\n        file: File(\n            "/C:/Users/elli0t43/Desktop/testasm/test.s",\n        ),\n        arguments: Some(\n            Arguments(\n                [\n                    "gcc",\n                    "-g",\n                    "/C:/Users/elli0t43/Desktop/testasm/test.s",\n                ],\n            ),\n        ),\n        command: None,\n        output: None,\n    },\n]\nINFO [asm_lsp::handle] Published diagnostics on save in 0ms\n'
[DEBUG][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:408	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///C:/Users/elli0t43/Desktop/testasm/test.s"  }}
[DEBUG][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:408	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///C:/Users/elli0t43/Desktop/testasm/test.s"  }}
[ERROR][2024-11-22 00:18:33] .../vim/lsp/rpc.lua:770	"rpc"	"C:\\Users\\elli0t43\\AppData\\Local\\nvim-data\\mason\\bin\\asm-lsp.CMD"	"stderr"	'WARN [asm_lsp::types] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.s, using /C:/Users/elli0t43/Desktop/testasm/test.s\nINFO [asm_lsp::types] Selected root config\nERROR [asm_lsp::lsp] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.s, using /C:/Users/elli0t43/Desktop/testasm/test.s\nWARN [asm_lsp::types] Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.s, using /C:/Users/elli0t43/Desktop/testasm/test.s\nINFO [asm_lsp::types] Selected root config\nINFO [asm_lsp::handle] Selected compile command(s) for request: [\n    CompileCommand {\n        directory: "",\n        file: File(\n            "/C:/Users/elli0t43/Desktop/testasm/test.s",\n        ),\n        arguments: Some(\n            Arguments(\n                [\n                    "gcc",\n                    "-g",\n  

Failed to canonicalized request path /C:/Users/elli0t43/Desktop/testasm/test.s this is what I believe causing the issue
But yeah take it as a grain of salt, its just a hunch

@WillLillis
Copy link
Collaborator

WillLillis commented Nov 21, 2024

At first glance it looks like there's a leading slash that's causing issues in the windows case when canonicalization fails. I'll have to spend some time digging in to see which part is causing this.

Really appreciate you taking the time to investigate!

@WillLillis
Copy link
Collaborator

Ok this was actually pretty tricky, but it looks like things are finally working!

image

I'll duplicate this explanation in the PR, but I think it makes sense to leave here for future use as well.

Ok so for some reason, when a path is canonicalized in Windows, it gets prefixed with "\?". That is, C:\Users\foo\bar gets turned into \\?\C:\Users\foo\bar. There's an explanation here on why this could be a good idea, except it looks like common tools (like gcc) don't recognize this convention. For example:

image

I may be completely missing something here, but I don't really understand why this convention is established if it isn't going to be followed consistently. The hack solution is to just check for this prefix and remove it. This may pop up in other parts of the code base, but for now I've gotten diagnostics working at least.

@WillLillis
Copy link
Collaborator

@elli0t43 Diagnostics are working for me locally on Windows, but please re-open this issue if #181 doesn't fix your problems :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants