Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Rathur421/latex-ts-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A super basic latex-ts-mode implementation with syntax highlighting shamelessly taken from nvim people!

Disclaimer:

⚠️ I mainly wanted to try how to do a tree-sitter major mode and that’s why this repo exist. I’m not sure if I will be able to maintain it reliably and for know it’s really super basic.

As such I’ll provide the bare minimum of information to make it work for those who want to try and/or improve it

Install the tree-sitter library

  1. Clone the repo at https://github.com/latex-lsp/tree-sitter-latex/tree/master
  2. src_sh{tree-sitter generate}
  3. compile it using src_sh{gcc}
  4. move the generated library (.so) to your emacs variable treesit-extra-load-path directory

Install the package

Clone the repo and load it using use-package as usual

Once in a latex file use latex-ts-mode

Build via texlab

Tested via tectonic V2 In your .dir-locals.el

((nil .
      ((eglot-workspace-configuration
        . (texlab (:build (:executable "tectonic"
                           :args ["-X" "build" "--keep-logs" "--keep-intermediates"]
                           :onSave t
                           :auxDirectory "build/<output_dir>/")))))))

Then call eglot-texlab-build

What I would like to do

  1. [X] syntax highlighting
  2. [X] indentation based on treesit
  3. [ ] Imenu support
  4. [-] extend eglot for texlab
    1. [X] BuildResquest
    2. [ ] Forward Search
    3. [ ] maybe as a separate package?
  5. [ ] make basic configuration for tectonic
  6. [ ] instant latex preview using org-latex preview (could be done fast as we can use the tree-sitter parser?)
    1. [ ] maybe as a separate package?

About

A basic latex mode for emacs based on tree-sitter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors