Giter VIP home page Giter VIP logo

Comments (5)

rommeswi avatar rommeswi commented on July 21, 2024 1

I can confirm this behavior. It seems intended but might not be optimal:

;; Rebind latex keys to avoid conflicts with lsp mode

(if (eq latex-backend 'lsp)
(spacemacs/set-leader-keys-for-major-mode 'latex-mode
"au" 'TeX-command-run-all
"c" 'latex/build
"iC" 'org-ref-insert-cite-key
"ic" 'LaTeX-close-environment ;; C-c ]
"ie" 'LaTeX-environment) ;; C-c C-e
(spacemacs/set-leader-keys-for-major-mode 'latex-mode
"c" 'LaTeX-close-environment ;; C-c ]
"e" 'LaTeX-environment)) ;; C-c C-e

Moreover:

(let ((prefix (if (eq latex-backend 'lsp) "R" "r")))
(spacemacs/declare-prefix-for-mode 'latex-mode (concat "m" prefix) "reftex")
(spacemacs/set-leader-keys-for-major-mode 'latex-mode
(concat prefix "c") 'reftex-citation
(concat prefix "g") 'reftex-grep-document
(concat prefix "i") 'reftex-index-selection-or-word
(concat prefix "I") 'reftex-display-index
(concat prefix " " "TAB") 'reftex-index
(concat prefix "l") 'reftex-label
(concat prefix "p") 'reftex-index-phrase-selection-or-word
(concat prefix "P") 'reftex-index-visit-phrases-buffer
(concat prefix "r") 'reftex-reference
(concat prefix "s") 'reftex-search-document
(concat prefix "t") 'reftex-toc
(concat prefix "T") 'reftex-toc-recenter
(concat prefix "v") 'reftex-view-crossref)))

and:

  (unless (and (eq latex-backend 'lsp)
              (eq mode 'latex-mode))
   (spacemacs/declare-prefix-for-mode mode "mh" "help")
   (spacemacs/declare-prefix-for-mode mode "mx" "text/fonts")
   (spacemacs/set-leader-keys-for-major-mode mode
     "a"   'TeX-command-run-all                         ;; C-c C-a
     "b"   'latex/build))

All in the packages.el of the latex layer. I have to say I am also unhappy with how the latex layer moves around keybindings a lot, depending on configuration (outline minor mode for example is shifted to C-c @ without which-key telling you about it).

I don't have a good solution in mind. The latex layer seems a bit extreme in this in comparison to other layers I am using.

from spacemacs.

tigerjack avatar tigerjack commented on July 21, 2024

@rommeswi now that I know about all this latex-backend-related changes, I feel even more annoyed.

from spacemacs.

rommeswi avatar rommeswi commented on July 21, 2024

I never used the major mode menu in latex but always used the auctex bindings, so I never noticed. I might have checked out the major mode menu once and found it not useful. I never knew that without lsp there is actually a lot of useful stuff in there.

Currently, in the latex major mode SPC m =, SPC m a, SPC m b, SPC m h, SPC m r, SPC m x, SPC m F, SPC m G, SPC m T are exclusively for lsp and it removes all the other bindings. I think that is indeed something that cannot stay like this.

What can be done immediately is that lsp is allowed to override all the bindings but not remove the entire bunch.

from spacemacs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.