Last active
August 19, 2026 04:34
-
-
Save gongo/ab71201e1ecfbfe5679eb474467e4c07 to your computer and use it in GitHub Desktop.
Emacs Lisp の lsp-mode (tsgo) で tsgo が動くようになる奴
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (leaf lsp-mode | |
| :ensure t | |
| ;; snip | |
| ;; | |
| ;; Workaround for the following error: | |
| ;; | |
| ;; LSP :: Error from the Language Server: InvalidParams: json: cannot unmarshal into Go lsproto.TextDocumentClientCapabilities | |
| ;; within "/capabilities/textDocument/inlineCompletion": null value is not allowed for field "inlineCompletion" (Invalid Parameters) | |
| ;; | |
| ;; see: | |
| ;; | |
| ;; https://github.com/emacs-lsp/lsp-mode/issues/5081 | |
| ;; https://github.com/khinshankhan/dotfiles/blob/4b356a6900afe63058c73464d77bcc074f97fb9e/emacs/.emacs.d/modules/tools/lsp.el#L50-L57 | |
| ;; | |
| :advice | |
| (:filter-return lsp--client-capabilities | |
| (lambda (caps) | |
| (when-let* ((text-doc (alist-get 'textDocument caps))) | |
| (setf (alist-get 'inlineCompletion text-doc nil 'remove) nil)) | |
| caps)) | |
| ;; snip | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment