From 7e2f543d95dd0453cbfdd08ad0c163e5177b8b8d Mon Sep 17 00:00:00 2001 From: tiago Date: Sun, 14 Dec 2025 18:11:49 +0000 Subject: [PATCH] nvim org updates --- .config/i3/config | 3 +- .config/nvim/lua/tsousa/plugins/lualine.lua | 2 +- .config/nvim/lua/tsousa/plugins/orgmode.lua | 20 +- .../nvim/lua/tsousa/plugins/treesitter.lua | 203 +++++++++--------- .gitconfig | 2 + .local/share/scripts/tmux-sessionizer.sh | 2 +- 6 files changed, 122 insertions(+), 110 deletions(-) diff --git a/.config/i3/config b/.config/i3/config index d9d0fbd..c2fe7f9 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -226,6 +226,7 @@ gaps top 32 assign [class="tidal-hifi"] 4 assign [class="discord"] 5 assign [class="vesktop"] 5 +assign [class="Ferdium"] 5 assign [class="Element"] 6 assign [class="Signal"] 6 assign [class="thunderbird"] 7 @@ -234,7 +235,7 @@ for_window [instance="^copyq$" class="^copyq$"] floating enable, resize set 600 # startup programs # sets up monitors and picom exec_always --no-startup-id $monitor_script -exec --no-startup-id nextcloud +exec --no-startup-id opencloud exec --no-startup-id copyq diff --git a/.config/nvim/lua/tsousa/plugins/lualine.lua b/.config/nvim/lua/tsousa/plugins/lualine.lua index c801025..1679481 100644 --- a/.config/nvim/lua/tsousa/plugins/lualine.lua +++ b/.config/nvim/lua/tsousa/plugins/lualine.lua @@ -16,7 +16,7 @@ return { always_divide_middle = true, globalstatus = false, refresh = { - statusline = 1000, + statusline = 100, tabline = 1000, winbar = 1000, } diff --git a/.config/nvim/lua/tsousa/plugins/orgmode.lua b/.config/nvim/lua/tsousa/plugins/orgmode.lua index b3d27f0..191677e 100644 --- a/.config/nvim/lua/tsousa/plugins/orgmode.lua +++ b/.config/nvim/lua/tsousa/plugins/orgmode.lua @@ -1,17 +1,17 @@ return { "nvim-orgmode/orgmode", + ft = { 'org' }, dependencies = { - "nvim-treesitter/nvim-treesitter", - "akinsho/org-bullets.nvim", + -- "akinsho/org-bullets.nvim", }, config = function() -- -- Load custom treesitter grammar for org filetype - require("org-bullets").setup({ - symbols = { - headlines = { "◉", "○", "●", "✸" }, - checkboxes = false, - }, - }) + -- require("org-bullets").setup({ + -- symbols = { + -- headlines = { "◉", "○", "●", "✸" }, + -- checkboxes = false, + -- }, + -- }) -- require('orgmode').setup_ts_grammar() -- -- Treesitter configuration -- require('nvim-treesitter.configs').setup { @@ -26,8 +26,8 @@ return { -- ensure_installed = { 'org' }, -- Or run :TSUpdate org -- } require('orgmode').setup({ - org_agenda_files = { '~/Nextcloud/org/**/*', '~/Nextcloud/Documents/uni/**/*' }, - org_default_notes_file = '~/Nextcloud/org/refile.org', + org_agenda_files = { '~/org/**/*' }, + org_default_notes_file = '~/org/refile.org', }) end } diff --git a/.config/nvim/lua/tsousa/plugins/treesitter.lua b/.config/nvim/lua/tsousa/plugins/treesitter.lua index 4f5974a..1de0f4a 100644 --- a/.config/nvim/lua/tsousa/plugins/treesitter.lua +++ b/.config/nvim/lua/tsousa/plugins/treesitter.lua @@ -1,101 +1,110 @@ return { - { - "nvim-treesitter/nvim-treesitter", - version = false, -- last release is way too old and doesn't work on Windows - build = ":TSUpdate", - init = function(plugin) - -- PERF: add nvim-treesitter queries to the rtp and it's custom query predicates early - -- This is needed because a bunch of plugins no longer `require("nvim-treesitter")`, which - -- no longer trigger the **nvim-treeitter** module to be loaded in time. - -- Luckily, the only thins that those plugins need are the custom queries, which we make available - -- during startup. - require("lazy.core.loader").add_to_rtp(plugin) - require("nvim-treesitter.query_predicates") - end, - dependencies = { "nvim-treesitter/nvim-treesitter-textobjects" }, - opts = { - highlight = { enable = true }, - indent = { enable = true }, - ensure_installed = { - "bash", - "c", - "diff", - "html", - "javascript", - "json", - "lua", - "luadoc", - "luap", - "markdown", - "markdown_inline", - "python", - "toml", - "vim", - "vimdoc", - "yaml", - "dockerfile", - "go", - "haskell", - "rust", - }, - textobjects = { - move = { - enable = true, - goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer" }, - goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer" }, - goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer" }, - goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer" }, - }, - }, - }, - config = function(_, opts) - if type(opts.ensure_installed) == "table" then - local added = {} - opts.ensure_installed = vim.tbl_filter(function(lang) - if added[lang] then - return false - end - added[lang] = true - return true - end, opts.ensure_installed) - end - require("nvim-treesitter.configs").setup(opts) - end, - }, - { - "romgrk/nvim-treesitter-context", - config = function() - require("treesitter-context").setup({ - throttle = true, -- Throttles plugin updates (may improve performance) - max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit. - show_all_context = false, - patterns = { -- Match patterns for TS nodes. These get wrapped to match at word boundaries. - -- For all filetypes - -- Note that setting an entry here replaces all other patterns for this entry. - -- By setting the 'default' entry below, you can control which nodes you want to - -- appear in the context window. - default = { - "function", - "method", - "for", - "while", - "if", - "switch", - "case", - }, + { + "nvim-treesitter/nvim-treesitter", + version = false, -- last release is way too old and doesn't work on Windows + build = ":TSUpdate", + init = function(plugin) + -- PERF: add nvim-treesitter queries to the rtp and it's custom query predicates early + -- This is needed because a bunch of plugins no longer `require("nvim-treesitter")`, which + -- no longer trigger the **nvim-treeitter** module to be loaded in time. + -- Luckily, the only thins that those plugins need are the custom queries, which we make available + -- during startup. + require("lazy.core.loader").add_to_rtp(plugin) + require("nvim-treesitter.query_predicates") + end, + dependencies = { "nvim-treesitter/nvim-treesitter-textobjects" }, + opts = { + highlight = { enable = true }, + indent = { enable = true }, + ensure_installed = { + "bash", + "c", + "diff", + "html", + "javascript", + "json", + "lua", + "luadoc", + "luap", + "markdown", + "markdown_inline", + "python", + "toml", + "vim", + "vimdoc", + "yaml", + "dockerfile", + "go", + "haskell", + "rust", + }, + textobjects = { + move = { + enable = true, + goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer" }, + goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer" }, + goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer" }, + goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer" }, + }, + }, + }, + config = function(_, opts) + if type(opts.ensure_installed) == "table" then + local added = {} + opts.ensure_installed = vim.tbl_filter(function(lang) + if added[lang] then + return false + end + added[lang] = true + return true + end, opts.ensure_installed) + end + require("nvim-treesitter.configs").setup(opts) + local parser_config = require("nvim-treesitter.parsers").get_parser_configs() + parser_config.org = { + install_info = { + url = "https://github.com/milisims/tree-sitter-org", + revision = "main", + files = { "src/parser.c", "src/scanner.c" }, + }, + filetype = "org", + } + end, + }, + { + "romgrk/nvim-treesitter-context", + config = function() + require("treesitter-context").setup({ + throttle = true, -- Throttles plugin updates (may improve performance) + max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit. + show_all_context = false, + patterns = { -- Match patterns for TS nodes. These get wrapped to match at word boundaries. + -- For all filetypes + -- Note that setting an entry here replaces all other patterns for this entry. + -- By setting the 'default' entry below, you can control which nodes you want to + -- appear in the context window. + default = { + "function", + "method", + "for", + "while", + "if", + "switch", + "case", + }, - rust = { - "loop_expression", - "impl_item", - }, + rust = { + "loop_expression", + "impl_item", + }, - typescript = { - "class_declaration", - "abstract_class_declaration", - "else_clause", - }, - }, - }) - end - } + typescript = { + "class_declaration", + "abstract_class_declaration", + "else_clause", + }, + }, + }) + end, + }, } diff --git a/.gitconfig b/.gitconfig index f07707b..b2499a1 100644 --- a/.gitconfig +++ b/.gitconfig @@ -10,3 +10,5 @@ gpgsign = true [init] defaultBranch = main +[alias] + tree = log --oneline --greaph --decorate --all diff --git a/.local/share/scripts/tmux-sessionizer.sh b/.local/share/scripts/tmux-sessionizer.sh index 6efb943..816a68e 100755 --- a/.local/share/scripts/tmux-sessionizer.sh +++ b/.local/share/scripts/tmux-sessionizer.sh @@ -4,7 +4,7 @@ if [[ $# -eq 1 ]]; then selected=$1 else - selected=$(find -L ~/Nextcloud ~/.config ~/gits ~/gits/qmk_firmware/keyboards/tsousa ~/ -mindepth 1 -maxdepth 1 -type d,l | fzf) + selected=$(find -L ~/org ~/.config ~/gits ~/gits/qmk_firmware/keyboards/tsousa ~/ -mindepth 1 -maxdepth 1 -type d,l | fzf) fi if [[ -z "$selected" ]]; then