nvim org updates
This commit is contained in:
parent
8d74ee5071
commit
7e2f543d95
6 changed files with 122 additions and 110 deletions
|
|
@ -226,6 +226,7 @@ gaps top 32
|
||||||
assign [class="tidal-hifi"] 4
|
assign [class="tidal-hifi"] 4
|
||||||
assign [class="discord"] 5
|
assign [class="discord"] 5
|
||||||
assign [class="vesktop"] 5
|
assign [class="vesktop"] 5
|
||||||
|
assign [class="Ferdium"] 5
|
||||||
assign [class="Element"] 6
|
assign [class="Element"] 6
|
||||||
assign [class="Signal"] 6
|
assign [class="Signal"] 6
|
||||||
assign [class="thunderbird"] 7
|
assign [class="thunderbird"] 7
|
||||||
|
|
@ -234,7 +235,7 @@ for_window [instance="^copyq$" class="^copyq$"] floating enable, resize set 600
|
||||||
# startup programs
|
# startup programs
|
||||||
# sets up monitors and picom
|
# sets up monitors and picom
|
||||||
exec_always --no-startup-id $monitor_script
|
exec_always --no-startup-id $monitor_script
|
||||||
exec --no-startup-id nextcloud
|
exec --no-startup-id opencloud
|
||||||
|
|
||||||
exec --no-startup-id copyq
|
exec --no-startup-id copyq
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ return {
|
||||||
always_divide_middle = true,
|
always_divide_middle = true,
|
||||||
globalstatus = false,
|
globalstatus = false,
|
||||||
refresh = {
|
refresh = {
|
||||||
statusline = 1000,
|
statusline = 100,
|
||||||
tabline = 1000,
|
tabline = 1000,
|
||||||
winbar = 1000,
|
winbar = 1000,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,17 @@
|
||||||
return {
|
return {
|
||||||
"nvim-orgmode/orgmode",
|
"nvim-orgmode/orgmode",
|
||||||
|
ft = { 'org' },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
-- "akinsho/org-bullets.nvim",
|
||||||
"akinsho/org-bullets.nvim",
|
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
-- -- Load custom treesitter grammar for org filetype
|
-- -- Load custom treesitter grammar for org filetype
|
||||||
require("org-bullets").setup({
|
-- require("org-bullets").setup({
|
||||||
symbols = {
|
-- symbols = {
|
||||||
headlines = { "◉", "○", "●", "✸" },
|
-- headlines = { "◉", "○", "●", "✸" },
|
||||||
checkboxes = false,
|
-- checkboxes = false,
|
||||||
},
|
-- },
|
||||||
})
|
-- })
|
||||||
-- require('orgmode').setup_ts_grammar()
|
-- require('orgmode').setup_ts_grammar()
|
||||||
-- -- Treesitter configuration
|
-- -- Treesitter configuration
|
||||||
-- require('nvim-treesitter.configs').setup {
|
-- require('nvim-treesitter.configs').setup {
|
||||||
|
|
@ -26,8 +26,8 @@ return {
|
||||||
-- ensure_installed = { 'org' }, -- Or run :TSUpdate org
|
-- ensure_installed = { 'org' }, -- Or run :TSUpdate org
|
||||||
-- }
|
-- }
|
||||||
require('orgmode').setup({
|
require('orgmode').setup({
|
||||||
org_agenda_files = { '~/Nextcloud/org/**/*', '~/Nextcloud/Documents/uni/**/*' },
|
org_agenda_files = { '~/org/**/*' },
|
||||||
org_default_notes_file = '~/Nextcloud/org/refile.org',
|
org_default_notes_file = '~/org/refile.org',
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,101 +1,110 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
version = false, -- last release is way too old and doesn't work on Windows
|
version = false, -- last release is way too old and doesn't work on Windows
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
init = function(plugin)
|
init = function(plugin)
|
||||||
-- PERF: add nvim-treesitter queries to the rtp and it's custom query predicates early
|
-- 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
|
-- 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.
|
-- 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
|
-- Luckily, the only thins that those plugins need are the custom queries, which we make available
|
||||||
-- during startup.
|
-- during startup.
|
||||||
require("lazy.core.loader").add_to_rtp(plugin)
|
require("lazy.core.loader").add_to_rtp(plugin)
|
||||||
require("nvim-treesitter.query_predicates")
|
require("nvim-treesitter.query_predicates")
|
||||||
end,
|
end,
|
||||||
dependencies = { "nvim-treesitter/nvim-treesitter-textobjects" },
|
dependencies = { "nvim-treesitter/nvim-treesitter-textobjects" },
|
||||||
opts = {
|
opts = {
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
indent = { enable = true },
|
indent = { enable = true },
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"bash",
|
"bash",
|
||||||
"c",
|
"c",
|
||||||
"diff",
|
"diff",
|
||||||
"html",
|
"html",
|
||||||
"javascript",
|
"javascript",
|
||||||
"json",
|
"json",
|
||||||
"lua",
|
"lua",
|
||||||
"luadoc",
|
"luadoc",
|
||||||
"luap",
|
"luap",
|
||||||
"markdown",
|
"markdown",
|
||||||
"markdown_inline",
|
"markdown_inline",
|
||||||
"python",
|
"python",
|
||||||
"toml",
|
"toml",
|
||||||
"vim",
|
"vim",
|
||||||
"vimdoc",
|
"vimdoc",
|
||||||
"yaml",
|
"yaml",
|
||||||
"dockerfile",
|
"dockerfile",
|
||||||
"go",
|
"go",
|
||||||
"haskell",
|
"haskell",
|
||||||
"rust",
|
"rust",
|
||||||
},
|
},
|
||||||
textobjects = {
|
textobjects = {
|
||||||
move = {
|
move = {
|
||||||
enable = true,
|
enable = true,
|
||||||
goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer" },
|
goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer" },
|
||||||
goto_next_end = { ["]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_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer" },
|
||||||
goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer" },
|
goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
if type(opts.ensure_installed) == "table" then
|
if type(opts.ensure_installed) == "table" then
|
||||||
local added = {}
|
local added = {}
|
||||||
opts.ensure_installed = vim.tbl_filter(function(lang)
|
opts.ensure_installed = vim.tbl_filter(function(lang)
|
||||||
if added[lang] then
|
if added[lang] then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
added[lang] = true
|
added[lang] = true
|
||||||
return true
|
return true
|
||||||
end, opts.ensure_installed)
|
end, opts.ensure_installed)
|
||||||
end
|
end
|
||||||
require("nvim-treesitter.configs").setup(opts)
|
require("nvim-treesitter.configs").setup(opts)
|
||||||
end,
|
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
|
||||||
},
|
parser_config.org = {
|
||||||
{
|
install_info = {
|
||||||
"romgrk/nvim-treesitter-context",
|
url = "https://github.com/milisims/tree-sitter-org",
|
||||||
config = function()
|
revision = "main",
|
||||||
require("treesitter-context").setup({
|
files = { "src/parser.c", "src/scanner.c" },
|
||||||
throttle = true, -- Throttles plugin updates (may improve performance)
|
},
|
||||||
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
|
filetype = "org",
|
||||||
show_all_context = false,
|
}
|
||||||
patterns = { -- Match patterns for TS nodes. These get wrapped to match at word boundaries.
|
end,
|
||||||
-- 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
|
"romgrk/nvim-treesitter-context",
|
||||||
-- appear in the context window.
|
config = function()
|
||||||
default = {
|
require("treesitter-context").setup({
|
||||||
"function",
|
throttle = true, -- Throttles plugin updates (may improve performance)
|
||||||
"method",
|
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
|
||||||
"for",
|
show_all_context = false,
|
||||||
"while",
|
patterns = { -- Match patterns for TS nodes. These get wrapped to match at word boundaries.
|
||||||
"if",
|
-- For all filetypes
|
||||||
"switch",
|
-- Note that setting an entry here replaces all other patterns for this entry.
|
||||||
"case",
|
-- 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 = {
|
rust = {
|
||||||
"loop_expression",
|
"loop_expression",
|
||||||
"impl_item",
|
"impl_item",
|
||||||
},
|
},
|
||||||
|
|
||||||
typescript = {
|
typescript = {
|
||||||
"class_declaration",
|
"class_declaration",
|
||||||
"abstract_class_declaration",
|
"abstract_class_declaration",
|
||||||
"else_clause",
|
"else_clause",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end
|
end,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,3 +10,5 @@
|
||||||
gpgsign = true
|
gpgsign = true
|
||||||
[init]
|
[init]
|
||||||
defaultBranch = main
|
defaultBranch = main
|
||||||
|
[alias]
|
||||||
|
tree = log --oneline --greaph --decorate --all
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
if [[ $# -eq 1 ]]; then
|
if [[ $# -eq 1 ]]; then
|
||||||
selected=$1
|
selected=$1
|
||||||
else
|
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
|
fi
|
||||||
|
|
||||||
if [[ -z "$selected" ]]; then
|
if [[ -z "$selected" ]]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue