diff options
| author | Yigit Sever | 2024-12-17 10:41:02 +0100 |
|---|---|---|
| committer | Yigit Sever | 2024-12-17 10:41:02 +0100 |
| commit | 0e4fb32f0a8b76a72a2f6b293b6ac846dd2df9c9 (patch) | |
| tree | 96e50f1d09e193ab792f7af02f63ce7ec84ba1a3 /.config/nvim/lua/plugins | |
| parent | 23bfe0792fdcef335dd176365ba895946fecb5ce (diff) | |
| download | dotfiles-0e4fb32f0a8b76a72a2f6b293b6ac846dd2df9c9.tar.gz dotfiles-0e4fb32f0a8b76a72a2f6b293b6ac846dd2df9c9.tar.bz2 dotfiles-0e4fb32f0a8b76a72a2f6b293b6ac846dd2df9c9.zip | |
nvim: use harper and vale at the same time
Diffstat (limited to '.config/nvim/lua/plugins')
| -rw-r--r-- | .config/nvim/lua/plugins/lsp.lua | 56 |
1 files changed, 34 insertions, 22 deletions
diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua index cda35bf..e8ff863 100644 --- a/.config/nvim/lua/plugins/lsp.lua +++ b/.config/nvim/lua/plugins/lsp.lua | |||
| @@ -155,26 +155,7 @@ return { | |||
| 155 | filetypes = { 'sh', 'tex' }, | 155 | filetypes = { 'sh', 'tex' }, |
| 156 | }) | 156 | }) |
| 157 | 157 | ||
| 158 | vim.g.rustaceanvim = { | 158 | require("lspconfig")["harper_ls"].setup { |
| 159 | -- Plugin configuration | ||
| 160 | tools = { | ||
| 161 | }, | ||
| 162 | -- LSP configuration | ||
| 163 | server = { | ||
| 164 | on_attach = on_attach, | ||
| 165 | vim.lsp.inlay_hint.enable(true), | ||
| 166 | default_settings = { | ||
| 167 | -- rust-analyzer language server configuration | ||
| 168 | ['rust-analyzer'] = { | ||
| 169 | }, | ||
| 170 | }, | ||
| 171 | }, | ||
| 172 | -- DAP configuration | ||
| 173 | dap = { | ||
| 174 | }, | ||
| 175 | } | ||
| 176 | |||
| 177 | lspconfig.harper_ls.setup { | ||
| 178 | on_attach = on_attach, | 159 | on_attach = on_attach, |
| 179 | capabilities = capabilities, | 160 | capabilities = capabilities, |
| 180 | settings = { | 161 | settings = { |
| @@ -199,8 +180,30 @@ return { | |||
| 199 | } | 180 | } |
| 200 | }, | 181 | }, |
| 201 | filetypes = { | 182 | filetypes = { |
| 202 | "markdown", "rust", "typescript", "typescriptreact", "javascript", "python", "c", "cpp", "ruby", "swift", "csharp", "toml", "lua", "gitcommit", "java", "html", "vimwiki" | 183 | "markdown", "rust", "typescript", "typescriptreact", "javascript", "python", "c", "cpp", "ruby", "swift", "csharp", "toml", "lua", "gitcommit", "java", "html", "vimwiki", "tex" |
| 203 | } | 184 | }, |
| 185 | root_dir = function(fname) | ||
| 186 | return vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1]) | ||
| 187 | end, | ||
| 188 | } | ||
| 189 | |||
| 190 | vim.g.rustaceanvim = { | ||
| 191 | -- Plugin configuration | ||
| 192 | tools = { | ||
| 193 | }, | ||
| 194 | -- LSP configuration | ||
| 195 | server = { | ||
| 196 | on_attach = on_attach, | ||
| 197 | vim.lsp.inlay_hint.enable(true), | ||
| 198 | default_settings = { | ||
| 199 | -- rust-analyzer language server configuration | ||
| 200 | ['rust-analyzer'] = { | ||
| 201 | }, | ||
| 202 | }, | ||
| 203 | }, | ||
| 204 | -- DAP configuration | ||
| 205 | dap = { | ||
| 206 | }, | ||
| 204 | } | 207 | } |
| 205 | end, | 208 | end, |
| 206 | }, | 209 | }, |
| @@ -246,5 +249,14 @@ return { | |||
| 246 | } | 249 | } |
| 247 | } | 250 | } |
| 248 | } | 251 | } |
| 252 | }, | ||
| 253 | { | ||
| 254 | 'marcelofern/vale.nvim', | ||
| 255 | config = function() | ||
| 256 | require("vale").setup({ | ||
| 257 | bin = "/usr/bin/vale", | ||
| 258 | vale_config_path = "$HOME/.config/vale/.vale.ini", | ||
| 259 | }) | ||
| 260 | end, | ||
| 249 | } | 261 | } |
| 250 | } | 262 | } |
