diff options
| author | Ruben Beltran del Rio <jj@r.bdr.sh> | 2026-04-19 23:35:38 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <jj@r.bdr.sh> | 2026-04-23 14:30:46 +0200 |
| commit | e60d03ef78cfe7ba5bb0c495f2db38ed45220114 (patch) | |
| tree | 3d3061828a7c0d4edecc1bed4f160d89bf7277cf /config/nvim/lua | |
| parent | 7a08fbfbbe05351d3f6ebb282da31aa38e2ce99f (diff) | |
Add neorg, update treesiter to 0.12 branch
Diffstat (limited to 'config/nvim/lua')
| -rw-r--r-- | config/nvim/lua/neorg_config.lua | 3 | ||||
| -rw-r--r-- | config/nvim/lua/plugins.lua | 98 | ||||
| -rw-r--r-- | config/nvim/lua/treesitter_config.lua | 30 |
3 files changed, 91 insertions, 40 deletions
diff --git a/config/nvim/lua/neorg_config.lua b/config/nvim/lua/neorg_config.lua new file mode 100644 index 0000000..79fb8a1 --- /dev/null +++ b/config/nvim/lua/neorg_config.lua @@ -0,0 +1,3 @@ +vim.wo.foldlevel = 99 +vim.wo.conceallevel = 2 +vim.keymap.set("n", "gC", "<cmd>Neorg toc<CR>", {}) diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index 61d329d..ef68eee 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -1,12 +1,14 @@ +vim.g.mapleader = ' ' +vim.g.maplocalleader = ';' local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim' if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - 'git', - 'clone', - '--filter=blob:none', - 'https://github.com/folke/lazy.nvim.git', - '--branch=stable', -- latest stable release - lazypath, - }) +vim.fn.system({ + 'git', + 'clone', + '--filter=blob:none', + 'https://github.com/folke/lazy.nvim.git', + '--branch=stable', -- latest stable release + lazypath, +}) end vim.opt.rtp:prepend(lazypath) @@ -80,7 +82,12 @@ require('lazy').setup({ }, -- Treesitter - 'nvim-treesitter/nvim-treesitter', + { + 'nvim-treesitter/nvim-treesitter', + lazy = false, + build = ':TSUpdate', + branch = 'main' + }, 'https://git.sr.ht/~rbdr/tree-sitter-api-notation', 'https://git.sr.ht/~rbdr/tree-sitter-wmap', @@ -103,7 +110,11 @@ require('lazy').setup({ ['<S-Tab>'] = { 'snippet_backward', 'select_prev', 'fallback' }, }, sources = { - default = { 'lsp', 'path', 'snippets', 'buffer' }, + default = { 'lsp', 'path', 'buffer', 'snippets' }, + per_filetype = { + markdown = { 'lsp'}, + norg = { 'lsp'} + } }, fuzzy = { implementation = "prefer_rust_with_warning" }, }, @@ -119,6 +130,13 @@ require('lazy').setup({ 'mbbill/undotree', 'milkypostman/vim-togglelist', { + "3rd/image.nvim", + build = false, + opts = { + processor = "magick_cli", + } + }, + { 'folke/which-key.nvim', event = 'VeryLazy', init = function() @@ -136,9 +154,65 @@ require('lazy').setup({ } } }, + { + 'nvim-neorg/neorg', + lazy = false, + version = "*", + config = true, + dependencies = { + 'nvim-neorg/tree-sitter-norg', + 'nvim-neorg/tree-sitter-norg-meta', + }, + opts = { + load = { + ["core.defaults"] = {}, + ["core.concealer"] = {}, + ["core.pivot"] = {}, + ["core.latex.renderer"] = {}, + ["core.journal"] = { + config = { + journal_folder = "periodic/daily", + strategy = "flat", + template_name = "../../templates/daily.norg", + workspace = "brain", + }, + }, + ["core.dirman"] = { + config = { + workspaces = { + brain = "~/brain", + }, + default_workspace = "brain", + } + }, + ["external.interim-ls"] = {}, + ["core.completion"] = { + config = { engine = { module_name = "external.lsp-completion" } }, + }, + } +} + }, + { + "michaelb/sniprun", + branch = "master", - 'https://git.sr.ht/~rbdr/nota.nvim', - 'https://git.sr.ht/~rbdr/oleoboard.nvim', + build = "sh install.sh", + -- do 'sh install.sh 1' if you want to force compile locally + -- (instead of fetching a binary from the github release). Requires Rust >= 1.65 + + config = function() + require("sniprun").setup({ + -- your options + }) + end, + }, + 'benlubas/neorg-interim-ls', + { + 'https://git.sr.ht/~rbdr/nota.nvim', + opts = { + norg = true, + } + }, 'https://git.sr.ht/~rbdr/jannotate.nvim', 'https://git.sr.ht/~rbdr/marginalie.nvim' }) diff --git a/config/nvim/lua/treesitter_config.lua b/config/nvim/lua/treesitter_config.lua index 2502859..70f251f 100644 --- a/config/nvim/lua/treesitter_config.lua +++ b/config/nvim/lua/treesitter_config.lua @@ -1,7 +1,4 @@ -require'nvim-treesitter.configs'.setup { - -- A list of parser names, or "all" (the five listed parsers should always be installed) - ensure_installed = { - 'api_notation', +require('nvim-treesitter').install { 'bash', 'css', 'dart', @@ -28,28 +25,5 @@ require'nvim-treesitter.configs'.setup { 'toml', 'tsx', 'typescript', - 'wmap', 'yaml' - }, - - sync_install = false, - auto_install = true, - - endwise = { - enable = true - }, - - highlight = { - enable = true, - - disable = function(lang, buf) - local max_filesize = 100 * 1024 -- 100 KB - local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) - if ok and stats and stats.size > max_filesize then - return true - end - end, - - additional_vim_regex_highlighting = false, - }, -} + } |