fix(lsp): Fix LSP server attachment and JSON parsing issues

- Replace lspconfig.scl_lsp registration with vim.lsp.start() + FileType autocmd
  for Neovim 0.11+ compatibility
- Fix Lua reserved keyword 'end' in tables (use bracket notation ['end'])
- Fix JSON decoder pattern matching bugs (s:find -> s:sub:match)
- Add LSP method name conversion (textDocument/didOpen -> textDocument_didOpen)
- Handle request vs notification correctly (only respond to requests with id)
- Strip CRLF line endings for Windows compatibility
- Add semantic token handler aliases
- Update documentation with implementation notes
This commit is contained in:
2026-02-18 13:03:14 +01:00
parent 4429280524
commit 96c0c4584f
6 changed files with 201 additions and 91 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ end
local function range(start_line, start_char, end_line, end_char)
return {
start = position(start_line, start_char),
end = position(end_line, end_char),
["end"] = position(end_line, end_char),
}
end