Proofreading

This commit is contained in:
Fabrice Mouhartem 2023-10-14 18:11:44 +02:00
parent 2e703e3785
commit 03987fea67
1 changed files with 12 additions and 11 deletions

View File

@ -45,7 +45,8 @@ vim-like shortcuts.
# Ingredients # Ingredients
Before starting we will need several components to achieve this lofty goal of Before starting we will need several components to achieve this lofty goal of
painlessly writing LaTeX documents with the best text editor. painlessly writing LaTeX documents with the best text editor. Let us start by
listing them; we will shortly see the installation and configuration procedure:
* A configurable text editor to be able to write the document: * A configurable text editor to be able to write the document:
[Neovim](https://neovim.io). For that we will also need some plugins to [Neovim](https://neovim.io). For that we will also need some plugins to
@ -70,9 +71,8 @@ painlessly writing LaTeX documents with the best text editor.
# Setting Neovim up # Setting Neovim up
Now that we have prepared everything, we need to setup `Neovim` to be up to the Now that we have prepared everything, we need to setup `Neovim`.
task. We will assume a blank configuration and start from scratch.
We will assume a blank configuration and starts from scratch.
I got inspired by a [blogpost about snippets in I got inspired by a [blogpost about snippets in
Neovim](https://pcoves.gitlab.io/en/blog/nvim-snippets/#installation) and used Neovim](https://pcoves.gitlab.io/en/blog/nvim-snippets/#installation) and used
`NVIM_APPNAME` environment variables for testing this configuration. Please let `NVIM_APPNAME` environment variables for testing this configuration. Please let
@ -166,7 +166,8 @@ is possible now:
- Show table of content navigation: `,lt`. - Show table of content navigation: `,lt`.
* Using latex-specific text objects such as `$` for math or `e` for environment * Using latex-specific text objects such as `$` for math or `e` for environment
(defined by `\begin{…}` and `\end{…}`). (defined by `\begin{…}` and `\end{…}`).
- Insert command/environment : `<F6>/<F7>` (in normal and visual mode; these are not very accessible, but can be remapped). - Insert command/environment : `<F6>/<F7>` (in normal and visual mode; these are
not very accessible, but can be remapped).
- Support for [TeX - Support for [TeX
directives](https://github.com/lervag/vimtex/blob/master/doc/vimtex.txt#L481-L504) directives](https://github.com/lervag/vimtex/blob/master/doc/vimtex.txt#L481-L504)
(which are common with others LaTeX' IDEs), such as (which are common with others LaTeX' IDEs), such as
@ -221,15 +222,15 @@ local lspconfig = require("lspconfig")
lspconfig.texlab.setup {} lspconfig.texlab.setup {}
``` ```
Easy, innit? Well, that's all and good, we can now see errors and warnings Easy, innit? Well, that's well and good, we can now see errors and warnings
decorating the file like Christmas decorations, but we can not use any of the LSP decorating the file like a Christmas tree, but we can not use any of the LSP
tools such as obtaining information on a bibliography key, or rename a macro. tools such as obtaining information on a bibliography key, or rename a macro.
However, let us just remark that texlab is a pretty minimal LSP server, and However, let us just remark that texlab is a pretty minimal LSP server, and
does not implement the myriads of possible functionalities. does not implement the myriads of possible functionalities.
Henceforth, I simply copy-pasted the default example from the [nvim-lspconfig Henceforth, I simply copy-pasted the default example from the [nvim-lspconfig
Readme](https://github.com/neovim/nvim-lspconfig), tried the shortcuts one by Readme](https://github.com/neovim/nvim-lspconfig), tried the shortcuts one by
one, and removed these which raised an error for “not implemented one, and removed those which raised an error for “not implemented
functionality” 🤡: functionality” 🤡:
```lua ```lua
@ -314,12 +315,12 @@ One of the reasons I moved from
`vim-latex`, I was using [nvim-remote](https://github.com/mhinz/neovim-remote) `vim-latex`, I was using [nvim-remote](https://github.com/mhinz/neovim-remote)
which is a wrapper for `nvim --listen` with a lot of constraints, while the most which is a wrapper for `nvim --listen` with a lot of constraints, while the most
annoying one is that if I used reverse search from a detached[^1] zathura window annoying one is that if I used reverse search from a detached[^1] zathura window
without starting `nvr` first… then it is spawns the process which I cannot without starting `nvr` first… then it spawns the process which I cannot recover.
recover. Which usually happens when I'm in a rush to fix something quickly. Which usually happens when I'm in a rush to fix something quickly.
Fortunately, this is a thing of the past as it is possible to directly send a Fortunately, this is a thing of the past as it is possible to directly send a
directive to `vimtex` upon which it will look for the corresponding buffer and directive to `vimtex` upon which it will look for the corresponding buffer and
then open the file at the corresponding location while following its state open the file at the corresponding location while following its state
(which can be viewed with `,li`). (which can be viewed with `,li`).
To do so, the To do so, the
[documentation](https://github.com/lervag/vimtex/blob/master/doc/vimtex.txt#L5985-L6033) [documentation](https://github.com/lervag/vimtex/blob/master/doc/vimtex.txt#L5985-L6033)