Closed stradicat closed 2 years ago
lsp-mode
emacs -q -l lsp-start-plain.el
where lsp-start-plain.el can be downloaded here.
lsp-start-plain.el
No syntax highlighting on any language supported by lsp-mode until saving file and reverting/reloading
Observed behaviour: :eyes: :broken_heart: No working lsp until saving file and reverting / reloading
lsp
C-x b
newfile.extension
C-x b new.py
C-x C-w new.py
M-x revert-buffer
new.py
Expected behaviour: :heart: :smile: Working lsp at the moment of buffer creation, or at least right after saving the file
lsp-python, lsp-rust, lsp-java, lsp-dart, lsp-html, lsp-go
lsp-python
lsp-rust
lsp-java
lsp-dart
lsp-html
lsp-go
Linux
No response
((c-c++ :variables c-c++-adopt-subprojects t c-c++-backend 'lsp-ccls c-c++-dap-adapters 'dap-lldb) (clojure :variables clojure-backend 'lsp clojure-enable-fancify-symbols t clojure-enable-linters '(clj-kondo joker)) csv (dart :variables dart-backend 'lsp lsp-dart-flutter-sdk-dir "~/flutter/bin/" lsp-dart-sdk-dir "~/flutter/bin/cache/dart-sdk/") emacs-lisp (go :variables go-backend 'lsp go-use-golangci-lint t godoc-at-point-function 'godoc-gogetdoc gofmt-command "gofumpt") graphql groovy (html :variables web-fmt-tool 'web-beautify) (java :variables javascript-backend 'lsp) (javascript :variables javascript-backend 'lsp javascript-fmt-tool 'web-beautify javascript-import-tool 'import-js javascript-repl 'nodejs js2-include-node-externs t) (json :variables json-fmt-tool 'web-beautify) (julia :variables julia-backend 'lsp) (kotlin :variables kotlin-backend 'lsp kotlin-lsp-jar-path "/home/dmayr/kotlin-language-server/server/bin/kotlin-language-server") major-modes octave (perl5 :variables perl5-backend 'lsp) (plantuml :variables plantuml-jar-path "/usr/share/plantuml/plantuml.jar" org-plantuml-jar-path "/usr/share/plantuml/plantuml.jar") (php :variables php-backend 'ac-php-core) (python :variables python-backend 'lsp python-lsp-server 'pyright python-test-runner '(pytest nose) python-formatter 'yapf python-sort-imports-on-save t) (rust :variables rust-backend 'lsp lsp-rust-server 'rust-analyzer cargo-process-reload-on-modify t) (sql :variables sql-backend 'lsp sql-capitalize-keywords t sql-lsp-sqls-workspace-config-path 'workspace) (typescript :variables typescript-backend 'lsp typescript-fmt-tool 'typescript-formatter) react (vue :variables vue-backend 'lsp) ansible asciidoc markdown nginx (shell-scripts :variables shell-scripts-backend 'lsp) systemd windows-scripts yaml (auto-completion :variables auto-completion-enable-sort-by-usage t) better-defaults emoji (geolocation :variables geolocation-enable-automatic-theme-changer t) helm helpful (lsp :variables lsp-lens-enable t lsp-headerline-breadcrumb-enable t) (multiple-cursors :variables multiple-cursors-backend 'evil-mc) nav-flash (org :variables org-enable-appear-support t org-enable-asciidoc-support t org-enable-bootstrap-support t org-enable-epub-support t org-enable-hugo-support t org-enable-github-support t org-enable-notifications t org-start-notification-daemon-on-startup t org-enable-org-journal-support t org-journal-dir "~/Documentos/emacs-journal/" org-enable-trello-support t org-enable-valign t org-todo-dependencies-strategy 'naive-auto) (shell :variables shell-default-height 30 shell-default-position 'bottom) (spell-checking :variables spell-checking-enable-auto-dictionary t) (treemacs :variables treemacs-use-collapsed-directories 3 treemacs-use-git-mode 'deferred treemacs-use-filewatch-mode t treemacs-use-all-the-icons-theme t) (unicode-fonts :variables unicode-fonts-enable-ligatures t unicode-fonts-ligature-set '("<*" "<*>" "<+>" "<$>" "***" "<|" "|>" "<|>" "!!" "||" "===" "==>" "<<<" ">>>" "<>" "+++" "<-" "->" "=>" ">>" "<<" ">>=" "=<<" "-<" ">-" "-<<" ">>-" "/=" "==" "::" "++")) (bibtex :variables bibtex-enable-ebib-support t) (cmake :variables cmake-backend 'lsp cmake-enable-cmake-ide-support t) copy-as-format epub eww dap debug docker elasticsearch (git :variables git-enable-magit-gitflow-plugin t) github gtags import-js meson pandoc pdf prettier quickurl search-engine slack syntax-checking systemd templates version-control web-beautify (xclipboard :variables xclipboard-enable-cliphist t) spotify)
This is expected behaviour C-x b won't set the file name of the buffer, thus lsp-mode cannot start. Use C-x C-f to create new files.
C-x C-f
Thank you for the bug report
lsp-mode
related packages.where
lsp-start-plain.el
can be downloaded here.Bug description
Description :octocat:
No syntax highlighting on any language supported by
lsp-mode
until saving file and reverting/reloadingObserved behaviour: :eyes: :broken_heart: No working
lsp
until saving file and reverting / reloadingSteps to reproduce
Reproduction guide :beetle:
C-x b
newfile.extension
; let's exemplify this case with Python:C-x b new.py
lsp
won't work until saving the file. Save the file:C-x C-w new.py
lsp
-supported language server on sight.M-x revert-buffer
to reloadnew.py
new.py
and loads the appropriate language serverExpected behavior
Expected behaviour: :heart: :smile: Working
lsp
at the moment of buffer creation, or at least right after saving the fileWhich Language Server did you use?
lsp-python
,lsp-rust
,lsp-java
,lsp-dart
,lsp-html
,lsp-go
OS
Linux
Error callstack
No response
Anything else?
System Info :computer: