diff options
author | Yigit Sever | 2024-10-10 10:09:57 +0200 |
---|---|---|
committer | Yigit Sever | 2024-10-10 10:09:57 +0200 |
commit | 24f4cbc1ddc4c540b6d69c1cd9d66d60b06ccec1 (patch) | |
tree | a8ac83e95ae60b1eb2a82d8ffeaa196d257026cf | |
parent | 457c5609f1c58825eb3f84765e6f5959e6acb6a8 (diff) | |
download | dotfiles-24f4cbc1ddc4c540b6d69c1cd9d66d60b06ccec1.tar.gz dotfiles-24f4cbc1ddc4c540b6d69c1cd9d66d60b06ccec1.tar.bz2 dotfiles-24f4cbc1ddc4c540b6d69c1cd9d66d60b06ccec1.zip |
tex: use tex-fmt with efm
doesn't use the buffer but the file on disk currently, fix later
-rw-r--r-- | .config/efm-langserver/config.yaml | 4 | ||||
-rw-r--r-- | .config/nvim/lua/plugins/lsp.lua | 12 |
2 files changed, 15 insertions, 1 deletions
diff --git a/.config/efm-langserver/config.yaml b/.config/efm-langserver/config.yaml index 40031b0..baffb69 100644 --- a/.config/efm-langserver/config.yaml +++ b/.config/efm-langserver/config.yaml | |||
@@ -13,7 +13,11 @@ tools: | |||
13 | sh-shfmt: &sh-shfmt | 13 | sh-shfmt: &sh-shfmt |
14 | format-command: 'shfmt -ci -s -bn -i 4 -sr' | 14 | format-command: 'shfmt -ci -s -bn -i 4 -sr' |
15 | format-stdin: true | 15 | format-stdin: true |
16 | tex-fmt-formatter: &tex-fmt-formatter | ||
17 | format-command: 'tex-fmt --keep --tab 4 --print' | ||
16 | languages: | 18 | languages: |
17 | sh: | 19 | sh: |
18 | - <<: *sh-shellcheck | 20 | - <<: *sh-shellcheck |
19 | - <<: *sh-shfmt | 21 | - <<: *sh-shfmt |
22 | tex: | ||
23 | - <<: *tex-fmt-formatter | ||
diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua index c10eefc..41616de 100644 --- a/.config/nvim/lua/plugins/lsp.lua +++ b/.config/nvim/lua/plugins/lsp.lua | |||
@@ -128,8 +128,18 @@ return { | |||
128 | -- efm | 128 | -- efm |
129 | require("lspconfig")["efm"].setup({ | 129 | require("lspconfig")["efm"].setup({ |
130 | on_attach = on_attach, | 130 | on_attach = on_attach, |
131 | settings = { | ||
132 | initializationOptions = { | ||
133 | documentFormatting = true, | ||
134 | documentRangeFormatting = true, | ||
135 | hover = true, | ||
136 | documentSymbol = true, | ||
137 | codeAction = true, | ||
138 | completion = true | ||
139 | } | ||
140 | }, | ||
131 | capabilities = capabilities, | 141 | capabilities = capabilities, |
132 | filetypes = { 'sh' }, | 142 | filetypes = { 'sh', 'tex' }, |
133 | }) | 143 | }) |
134 | 144 | ||
135 | vim.g.rustaceanvim = { | 145 | vim.g.rustaceanvim = { |