summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/plugins
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/plugins')
-rw-r--r--.config/nvim/lua/plugins/conform.lua18
-rw-r--r--.config/nvim/lua/plugins/git.lua6
-rw-r--r--.config/nvim/lua/plugins/lastplace.lua11
-rw-r--r--.config/nvim/lua/plugins/lsp.lua107
-rw-r--r--.config/nvim/lua/plugins/telescope.lua4
-rw-r--r--.config/nvim/lua/plugins/typst.lua10
6 files changed, 131 insertions, 25 deletions
diff --git a/.config/nvim/lua/plugins/conform.lua b/.config/nvim/lua/plugins/conform.lua
new file mode 100644
index 0000000..9f15bbb
--- /dev/null
+++ b/.config/nvim/lua/plugins/conform.lua
@@ -0,0 +1,18 @@
1return {
2 {
3 'stevearc/conform.nvim',
4 opts = {
5 formatters_by_ft = {
6 lua = { "stylua" },
7 -- Conform will run multiple formatters sequentially
8 python = { "isort", "black" },
9 -- You can customize some of the format options for the filetype (:help conform.format)
10 rust = { "rustfmt", lsp_format = "fallback" },
11 -- Conform will run the first available formatter
12 javascript = { "prettierd", "prettier", stop_after_first = true },
13 -- latex
14 tex = { "tex-fmt" },
15 },
16 }
17 },
18}
diff --git a/.config/nvim/lua/plugins/git.lua b/.config/nvim/lua/plugins/git.lua
index db1f435..5f1c1e3 100644
--- a/.config/nvim/lua/plugins/git.lua
+++ b/.config/nvim/lua/plugins/git.lua
@@ -99,11 +99,11 @@ return {
99 { 99 {
100 "NeogitOrg/neogit", 100 "NeogitOrg/neogit",
101 dependencies = { 101 dependencies = {
102 "nvim-lua/plenary.nvim", -- required 102 "nvim-lua/plenary.nvim", -- required
103 "sindrets/diffview.nvim", -- optional - Diff integration 103 "sindrets/diffview.nvim", -- optional - Diff integration
104 "nvim-telescope/telescope.nvim", -- optional 104 "nvim-telescope/telescope.nvim", -- optional
105 }, 105 },
106 cmd="Neogit", 106 cmd = "Neogit",
107 config = true 107 config = true
108 } 108 }
109} 109}
diff --git a/.config/nvim/lua/plugins/lastplace.lua b/.config/nvim/lua/plugins/lastplace.lua
new file mode 100644
index 0000000..72e5c7f
--- /dev/null
+++ b/.config/nvim/lua/plugins/lastplace.lua
@@ -0,0 +1,11 @@
1return {
2 {
3 "ethanholz/nvim-lastplace",
4
5 opts = {
6 lastplace_ignore_buftype = { "quickfix", "nofile", "help" },
7 lastplace_ignore_filetype = { "gitcommit", "gitrebase", "svn", "hgcommit" },
8 lastplace_open_folds = true,
9 },
10 }
11}
diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua
index 41616de..e710fd7 100644
--- a/.config/nvim/lua/plugins/lsp.lua
+++ b/.config/nvim/lua/plugins/lsp.lua
@@ -80,6 +80,19 @@ return {
80 } 80 }
81 end 81 end
82 82
83 -- typst/tinymist
84 require("lspconfig")["tinymist"].setup({
85 on_attach = on_attach,
86 capabilities = capabilities,
87 single_file_support = true,
88 root_dir = function()
89 return vim.fn.getcwd()
90 end,
91 settings = {
92 formatterMode = "typstyle",
93 }
94 })
95
83 -- lua 96 -- lua
84 require("lspconfig")["lua_ls"].setup({ 97 require("lspconfig")["lua_ls"].setup({
85 on_attach = on_attach, 98 on_attach = on_attach,
@@ -142,26 +155,7 @@ return {
142 filetypes = { 'sh', 'tex' }, 155 filetypes = { 'sh', 'tex' },
143 }) 156 })
144 157
145 vim.g.rustaceanvim = { 158 require("lspconfig")["harper_ls"].setup {
146 -- Plugin configuration
147 tools = {
148 },
149 -- LSP configuration
150 server = {
151 on_attach = on_attach,
152 vim.lsp.inlay_hint.enable(true),
153 default_settings = {
154 -- rust-analyzer language server configuration
155 ['rust-analyzer'] = {
156 },
157 },
158 },
159 -- DAP configuration
160 dap = {
161 },
162 }
163
164 lspconfig.harper_ls.setup {
165 on_attach = on_attach, 159 on_attach = on_attach,
166 capabilities = capabilities, 160 capabilities = capabilities,
167 settings = { 161 settings = {
@@ -186,12 +180,58 @@ return {
186 } 180 }
187 }, 181 },
188 filetypes = { 182 filetypes = {
189 "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"
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 -- ltex
191 require("lspconfig")["ltex"].setup({
192 capabilities = capabilities,
193 on_attach = function(client, bufnr)
194 on_attach(client, bufnr)
195 require("ltex_extra").setup {
196 load_langs = { "en-GB" },
197 init_check = true,
198 log_level = "none",
199 }
200 end,
201 filetypes = { "bib", "gitcommit", "markdown", "org", "plaintex", "rst", "rnoweb", "tex", "pandoc", "quarto", "rmd", "context", "mail", "text" },
202 settings = {
203 ltex = {
204 enabled = { "bibtex", "gitcommit", "markdown", "org", "tex", "restructuredtext", "rsweave", "latex", "quarto", "rmd", "context", "mail", "plaintext" }
205 }
190 } 206 }
207 })
208
209 vim.g.rustaceanvim = {
210 -- Plugin configuration
211 tools = {
212 },
213 -- LSP configuration
214 server = {
215 on_attach = on_attach,
216 vim.lsp.inlay_hint.enable(true),
217 default_settings = {
218 -- rust-analyzer language server configuration
219 ['rust-analyzer'] = {
220 },
221 },
222 },
223 -- DAP configuration
224 dap = {
225 },
191 } 226 }
192 end, 227 end,
193 }, 228 },
194 { 229 {
230 "barreiroleo/ltex_extra.nvim",
231 ft = { "markdown", "tex" },
232 dependencies = { "neovim/nvim-lspconfig" },
233 },
234 {
195 "j-hui/fidget.nvim", 235 "j-hui/fidget.nvim",
196 event = "VeryLazy", 236 event = "VeryLazy",
197 opts = { 237 opts = {
@@ -215,9 +255,32 @@ return {
215 }, 255 },
216 { 256 {
217 "folke/lazydev.nvim", 257 "folke/lazydev.nvim",
218 ft = "lua", -- only load on lua files 258 ft = "lua",
219 }, 259 },
220 { 260 {
221 'fatih/vim-go' 261 'fatih/vim-go'
262 },
263 {
264 "danymat/neogen",
265 config = true,
266 opts = {
267 snippet_engine = "luasnip",
268 languages = {
269 python = {
270 template = {
271 annotation_convention = "reST",
272 }
273 }
274 }
275 }
276 },
277 {
278 'marcelofern/vale.nvim',
279 config = function()
280 require("vale").setup({
281 bin = "/usr/bin/vale",
282 vale_config_path = "$HOME/.config/vale/.vale.ini",
283 })
284 end,
222 } 285 }
223} 286}
diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua
index 40c99a4..bfda4aa 100644
--- a/.config/nvim/lua/plugins/telescope.lua
+++ b/.config/nvim/lua/plugins/telescope.lua
@@ -46,6 +46,10 @@ return {
46 map("n", "<leader>sw", require("telescope.builtin").grep_string, "🔭: current word") 46 map("n", "<leader>sw", require("telescope.builtin").grep_string, "🔭: current word")
47 map("n", "<leader>sg", require("telescope.builtin").live_grep, "🔭: live grep") 47 map("n", "<leader>sg", require("telescope.builtin").live_grep, "🔭: live grep")
48 map("n", "<leader>sd", require("telescope.builtin").diagnostics, "🔭: diagnostics") 48 map("n", "<leader>sd", require("telescope.builtin").diagnostics, "🔭: diagnostics")
49 map("n", "<leader>sc", function()
50 require("telescope.builtin").lsp_document_symbols({ symbols = 'function' })
51 end, "🔭: lsp symbols (functions)")
52
49 map("n", "<leader>st", function() 53 map("n", "<leader>st", function()
50 require("telescope.builtin").spell_suggest(require("telescope.themes").get_cursor({ 54 require("telescope.builtin").spell_suggest(require("telescope.themes").get_cursor({
51 prompt_title = "", 55 prompt_title = "",
diff --git a/.config/nvim/lua/plugins/typst.lua b/.config/nvim/lua/plugins/typst.lua
new file mode 100644
index 0000000..c04ea70
--- /dev/null
+++ b/.config/nvim/lua/plugins/typst.lua
@@ -0,0 +1,10 @@
1return {
2 {
3 'chomosuke/typst-preview.nvim',
4 ft = 'typst',
5 version = '1.*',
6 config = function()
7 require 'typst-preview'.setup {}
8 end,
9 }
10}