You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[client-request] (id:1) Sat Jun 2612:03:14 2021:
(:jsonrpc"2.0":id1:method"initialize":params
(:processId1053223:rootPath"/home/werner/":rootUri"file:///home/werner":initializationOptions#s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8125 data
())
:capabilities
(:workspace
(:applyEditt:executeCommand
(:dynamicRegistration:json-false)
:workspaceEdit
(:documentChanges:json-false)
:didChangeWatchedFiles
(:dynamicRegistrationt)
:symbol
(:dynamicRegistration:json-false)
:configurationt)
:textDocument
(:synchronization
(:dynamicRegistration:json-false:willSavet:willSaveWaitUntilt:didSavet)
:completion
(:dynamicRegistration:json-false:completionItem
(:snippetSupport:json-false)
:contextSupportt)
:hover
(:dynamicRegistration:json-false:contentFormat
["plaintext"])
:signatureHelp
(:dynamicRegistration:json-false:signatureInformation
(:parameterInformation
(:labelOffsetSupportt)
:activeParameterSupportt))
:references
(:dynamicRegistration:json-false)
:definition
(:dynamicRegistration:json-false)
:declaration
(:dynamicRegistration:json-false)
:implementation
(:dynamicRegistration:json-false)
:typeDefinition
(:dynamicRegistration:json-false)
:documentSymbol
(:dynamicRegistration:json-false:hierarchicalDocumentSymbolSupportt:symbolKind
(:valueSet
[1 2345678910111213141516171819202122232425 26]))
:documentHighlight
(:dynamicRegistration:json-false)
:codeAction
(:dynamicRegistration:json-false:codeActionLiteralSupport
(:codeActionKind
(:valueSet
["quickfix""refactor""refactor.extract""refactor.inline""refactor.rewrite""source""source.organizeImports"]))
:isPreferredSupportt)
:formatting
(:dynamicRegistration:json-false)
:rangeFormatting
(:dynamicRegistration:json-false)
:rename
(:dynamicRegistration:json-false)
:publishDiagnostics
(:relatedInformation:json-false))
:experimental#s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8125 data
()))))
[server-reply] (id:1) Sat Jun 2612:03:14 2021:
(:jsonrpc"2.0":id1:result
(:capabilities
(:completionProvider
(:resolveProvidert:triggerCharacters
["\\""{""}""@""/"""])
:definitionProvidert:documentFormattingProvidert:documentHighlightProvidert:documentLinkProvider
(:resolveProvider:json-false)
:documentSymbolProvidert:foldingRangeProvidert:hoverProvidert:referencesProvidert:renameProvider
(:prepareProvidert)
:textDocumentSync
(:change1:openCloset:save
(:includeText:json-false))
:workspaceSymbolProvidert)
:serverInfo
(:name"TexLab":version"3.2.0")))
[client-notification] Sat Jun 2612:03:14 2021:
(:jsonrpc"2.0":method"initialized":params#s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8125 data
()))
[client-notification] Sat Jun 2612:03:14 2021:
(:jsonrpc"2.0":method"textDocument/didOpen":params
(:textDocument
(:uri"file:///home/werner/test/test.tex":version0:languageId"latex":text"\\documentclass{paper}\n\n\\usepackage{amsmath}\n\\usepackage{braket}\n\\usepackage{mathtools}\n\\usepackage{stix}\n\\usepackage{hyperref}\n\n\\begin{document}\n\n$\\thermod$\n\n\\end{document}\n")))
[client-notification] Sat Jun 2612:03:14 2021:
(:jsonrpc"2.0":method"workspace/didChangeConfiguration":params
(:settingsnil))
[server-request] (id:0) Sat Jun 2612:03:14 2021:
(:jsonrpc"2.0":id0:method"workspace/configuration":params
(:items
[(:section"texlab")]))
[client-reply] (id:0) Sat Jun 2612:03:14 2021:
(:jsonrpc"2.0":id0:result
[nil])
[stderr] ERROR- Invalid configuration: invalid type: null, expected struct Options
[server-notification] Sat Jun 2612:03:15 2021:
(:jsonrpc"2.0":method"textDocument/publishDiagnostics":params
(:diagnostics
[(:message"File `test.out' has changed. Rerun to get outlines right or use package `bookmark'.":range
(:end
(:character0:line0)
:start
(:character0:line0))
:severity2:source"latex")]
:uri"file:///home/werner/test/test.tex"))
[server-notification] Sat Jun 2612:03:15 2021:
(:jsonrpc"2.0":method"textDocument/publishDiagnostics":params
(:diagnostics
[]
:uri"file:///home/werner/test/test.log"))
[internal] Sat Jun 2612:03:15 2021:
(:message"Diagnostics received for unvisited (file:///home/werner/test/test.log)")
[server-notification] Sat Jun 2612:03:15 2021:
(:jsonrpc"2.0":method"textDocument/publishDiagnostics":params
(:diagnostics
[]
:uri"file:///home/werner/test/test.aux"))
[internal] Sat Jun 2612:03:15 2021:
(:message"Diagnostics received for unvisited (file:///home/werner/test/test.aux)")
[server-notification] Sat Jun 2612:03:15 2021:
(:jsonrpc"2.0":method"textDocument/publishDiagnostics":params
(:diagnostics
[(:message"File `test.out' has changed. Rerun to get outlines right or use package `bookmark'.":range
(:end
(:character0:line0)
:start
(:character0:line0))
:severity2:source"latex")]
:uri"file:///home/werner/test/test.tex"))
[server-notification] Sat Jun 2612:03:15 2021:
(:jsonrpc"2.0":method"textDocument/publishDiagnostics":params
(:diagnostics
[]
:uri"file:///home/werner/test/test.log"))
[internal] Sat Jun 2612:03:15 2021:
(:message"Diagnostics received for unvisited (file:///home/werner/test/test.log)")
[server-notification] Sat Jun 2612:03:15 2021:
(:jsonrpc"2.0":method"textDocument/publishDiagnostics":params
(:diagnostics
[]
:uri"file:///home/werner/test/test.aux"))
[internal] Sat Jun 2612:03:15 2021:
(:message"Diagnostics received for unvisited (file:///home/werner/test/test.aux)")
[server-notification] Sat Jun 2612:03:15 2021:
(:jsonrpc"2.0":method"textDocument/publishDiagnostics":params
(:diagnostics
[(:message"File `test.out' has changed. Rerun to get outlines right or use package `bookmark'.":range
(:end
(:character0:line0)
:start
(:character0:line0))
:severity2:source"latex")]
:uri"file:///home/werner/test/test.tex"))
[server-notification] Sat Jun 2612:03:15 2021:
(:jsonrpc"2.0":method"textDocument/publishDiagnostics":params
(:diagnostics
[]
:uri"file:///home/werner/test/test.log"))
[internal] Sat Jun 2612:03:15 2021:
(:message"Diagnostics received for unvisited (file:///home/werner/test/test.log)")
[server-notification] Sat Jun 2612:03:15 2021:
(:jsonrpc"2.0":method"textDocument/publishDiagnostics":params
(:diagnostics
[]
:uri"file:///home/werner/test/test.aux"))
[internal] Sat Jun 2612:03:15 2021:
(:message"Diagnostics received for unvisited (file:///home/werner/test/test.aux)")
[server-notification] Sat Jun 2612:03:15 2021:
(:jsonrpc"2.0":method"textDocument/publishDiagnostics":params
(:diagnostics
[(:message"File `test.out' has changed. Rerun to get outlines right or use package `bookmark'.":range
(:end
(:character0:line0)
:start
(:character0:line0))
:severity2:source"latex")]
:uri"file:///home/werner/test/test.tex"))
[server-notification] Sat Jun 2612:03:15 2021:
(:jsonrpc"2.0":method"textDocument/publishDiagnostics":params
(:diagnostics
[]
:uri"file:///home/werner/test/test.log"))
[internal] Sat Jun 2612:03:15 2021:
(:message"Diagnostics received for unvisited (file:///home/werner/test/test.log)")
[server-notification] Sat Jun 2612:03:15 2021:
(:jsonrpc"2.0":method"textDocument/publishDiagnostics":params
(:diagnostics
[]
:uri"file:///home/werner/test/test.aux"))
[internal] Sat Jun 2612:03:15 2021:
(:message"Diagnostics received for unvisited (file:///home/werner/test/test.aux)")
Backtrace (mandatory, unless no error message seen or heard):
I don't have info of this part.
... Paste the backtrace here ...
Debugger entered--Lisp error: (error"oh no")
signal(error ("oh no"))
error("oh no")
eval((error"oh no") nil)
pp-eval-expression((error"oh no"))
funcall-interactively(pp-eval-expression (error"oh no"))
call-interactively(pp-eval-expression nilnil)
command-execute(pp-eval-expression)
Minimal configuration (mandatory)
# Type this in a shell to start an Emacs with Eglot configured# $ /path/to/a/certain/version/of/emacs -Q -f package-initialize -L /path/to/git-cloned/eglot -l eglot.el
$ emacs -q --load ~/.emacs.d/init.texlab-lsp-mode-eglot-lsp-latex-company
;; The minimal configuration of the above mentioned initialization file.;;Bootstrap straight
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil'nomessage))
(straight-use-package 'use-package)
(setq straight-use-package-by-default t)
;Using AUCTeX from local Git repo without installation;https://github.com/raxod502/straight.el/issues/800#issuecomment-862165317
(straight-use-package
`(auctex :type git :hostnil:repo"https://git.savannah.gnu.org/git/auctex.git":pre-build,(pcase system-type
(`berkeley-unix '("gmake"))
(_ '(
`("bash""-c""cd",(straight--repos-dir "auctex"))
("./autogen.sh")
("./configure""--without-texmf-dir""--with-lispdir=.")
("make")
)))))
(setq TeX-data-directory (straight--repos-dir "auctex")
TeX-lisp-directory TeX-data-directory)
; Or set the following variable via custom-set-variables in the opened buffer by the following command.; M-x describe-variable RET preview-TeX-style-dir RET;`(preview-TeX-style-dir ,(concat ".:" (straight--repos-dir "auctex") "latex:"))
(setq preview-TeX-style-dir (concat ".:" (straight--repos-dir "auctex") "latex:"))
(load"auctex.el"niltt)
(load"preview-latex.el"niltt)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
(use-package eglot
:hook
((TeX-mode . eglot-ensure))
:config
(add-to-list 'eglot-stay-out-of 'company)
;;; ensure texlab is set as the server.
(add-to-list 'eglot-server-programs
'((latex-mode tex-mode context-mode texinfo-mode bibtex-mode) . ("texlab"))))
(use-package company
:hook
(TeX-mode . company-mode)
:custom;https://github.com/company-mode/company-mode/issues/14#issuecomment-290261406; Do not downcase the returned candidates automatically
(company-dabbrev-downcase nil)
(company-idle-delay 0)
(company-minimum-prefix-length 1))
(use-package company-math)
(add-to-list 'company-backends 'company-math-symbols-unicode)
(defunmy-latex-mode-setup ()
(setq-local company-backends
(append'((company-math-symbols-latex
company-latex-commands
company-ispell
))
company-backends)))
(add-hook 'TeX-mode-hook 'my-latex-mode-setup)
And the testing tex document:
\documentclass{paper}
\usepackage{amsmath}
\usepackage{braket}
\usepackage{mathtools}
\usepackage{stix}
\usepackage{hyperref}
\begin{document}
Some testing code comes here.
\end{document}
With the above configuaration, some commands still couldn't be completed, as shown below.
The \bra command which is defined in braket package can't be completed:
The \href command which is defined in hyperref package can't be completed:
The text was updated successfully, but these errors were encountered:
skangas
changed the title
Failed to comlete some commands with company-math and company-ispell when using eglot, texlab, and company.
Failed to complete some commands with company-math and company-ispell when using eglot, texlab, and company
Jan 10, 2022
Almost two years on. I still haven't gotten to this. So sorry. Too much setup. Maybe @astoff, who develops a LaTeX LSP server and is familiar with the Eglot client and its code base, can lend a hand.
Judging by the screenshots, all seems to be working fine. It's impossible, theoretically and in practice, to determine all commands defined by a TeX package except by running TeX.
Unless @hongyi-zhao can confirm that these completions work in other editors, I'd say there's no bug here.
LSP transcript - M-x eglot-events-buffer (mandatory unless Emacs inoperable)
Backtrace (mandatory, unless no error message seen or heard):
Minimal configuration (mandatory)
And the testing tex document:
With the above configuaration, some commands still couldn't be completed, as shown below.
The
\bra
command which is defined inbraket
package can't be completed:The
\href
command which is defined inhyperref
package can't be completed:The text was updated successfully, but these errors were encountered: