mirror of
https://github.com/iofq/nvim.nix.git
synced 2026-01-23 08:55:16 -06:00
org mode
This commit is contained in:
parent
2bab00d2e3
commit
f47fc0f76f
8 changed files with 118 additions and 8 deletions
19
flake.lock
generated
19
flake.lock
generated
|
|
@ -410,6 +410,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim-orgmode": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1747057841,
|
||||
"narHash": "sha256-mLT3XnsRyG+ZldB9NrR9tjmaznRAISBsdVTVPSjhj0A=",
|
||||
"owner": "nvim-orgmode",
|
||||
"repo": "orgmode",
|
||||
"rev": "8ff03c75f3d808e3ea1765b7aba0fb4783a5a83f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-orgmode",
|
||||
"repo": "orgmode",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
|
|
@ -417,7 +433,8 @@
|
|||
"mini-nvim": "mini-nvim",
|
||||
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-uns": "nixpkgs-uns"
|
||||
"nixpkgs-uns": "nixpkgs-uns",
|
||||
"nvim-orgmode": "nvim-orgmode"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,10 @@
|
|||
url = "github:echasnovski/mini.nvim";
|
||||
flake = false;
|
||||
};
|
||||
nvim-orgmode = {
|
||||
url = "github:nvim-orgmode/orgmode";
|
||||
flake = false;
|
||||
};
|
||||
# Add bleeding-edge plugins here.
|
||||
# They can be updated with `nix flake update` (make sure to commit the generated flake.lock)
|
||||
# wf-nvim = {
|
||||
|
|
@ -37,7 +41,7 @@
|
|||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [
|
||||
# inputs.neovim-nightly-overlay.overlays.default
|
||||
inputs.neovim-nightly-overlay.overlays.default
|
||||
neovim-overlay
|
||||
# This adds a function can be used to generate a .luarc.json
|
||||
# containing the Neovim API all plugins in the workspace directory.
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ with final.pkgs.lib; let
|
|||
mkNeovim = pkgs.callPackage ./mkNeovim.nix { inherit pkgs-wrapNeovim; };
|
||||
|
||||
mini-nvim-git = mkNvimPlugin inputs.mini-nvim "mini.nvim";
|
||||
nvim-orgmode = mkNvimPlugin inputs.nvim-orgmode "orgmode";
|
||||
|
||||
all-plugins = with pkgs.vimPlugins; [
|
||||
blink-cmp
|
||||
|
|
@ -29,9 +30,23 @@ with final.pkgs.lib; let
|
|||
nightfox-nvim
|
||||
nvim-lint
|
||||
nvim-lspconfig
|
||||
nvim-orgmode
|
||||
nvim-treesitter-context
|
||||
nvim-treesitter-textobjects
|
||||
nvim-treesitter.withAllGrammars
|
||||
(nvim-treesitter.withPlugins (_:
|
||||
nvim-treesitter.allGrammars ++
|
||||
[(pkgs.tree-sitter.buildGrammar {
|
||||
language = "org";
|
||||
version = "2.0.1";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "nvim-orgmode";
|
||||
repo = "tree-sitter-org";
|
||||
rev = "2.0.1";
|
||||
hash = "sha256-k1g5+iyJvVWKOuAkFNaaKl42Xmmz9BN+vT0+IQ/4RQI=";
|
||||
};
|
||||
meta.homepage = "https://github.com/nvim-orgmode/tree-sitter-org";
|
||||
})]
|
||||
))
|
||||
oil-nvim
|
||||
refactoring-nvim
|
||||
render-markdown-nvim
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ vim.opt.autowrite = true
|
|||
vim.opt.backspace = 'indent,eol,start'
|
||||
vim.opt.confirm = true
|
||||
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
|
||||
vim.opt.diffopt = 'internal,filler,closeoff,inline:char'
|
||||
vim.opt.expandtab = true -- insert tabs as spaces
|
||||
vim.opt.inccommand = 'split' -- incremental live completion
|
||||
vim.opt.list = true
|
||||
|
|
@ -60,8 +61,6 @@ vim.keymap.set('n', '<S-l>', vim.cmd.bnext, { noremap = true, silent = true })
|
|||
vim.keymap.set('n', '<S-h>', vim.cmd.bprev, { noremap = true, silent = true })
|
||||
vim.keymap.set('v', '<', '<gv')
|
||||
vim.keymap.set('v', '>', '>gv')
|
||||
vim.keymap.set({ 'n', 'v' }, '[[', '{')
|
||||
vim.keymap.set({ 'n', 'v' }, ']]', '}')
|
||||
|
||||
-- resize splits if window got resized
|
||||
vim.api.nvim_create_autocmd({ 'VimResized' }, {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ return {
|
|||
dependencies = {
|
||||
'mikavilpas/blink-ripgrep.nvim',
|
||||
'fang2hou/blink-copilot',
|
||||
'nvim-orgmode/orgmode',
|
||||
},
|
||||
opts = {
|
||||
fuzzy = {
|
||||
|
|
@ -23,6 +24,9 @@ return {
|
|||
'ripgrep',
|
||||
'copilot',
|
||||
},
|
||||
per_filetype = {
|
||||
org = { 'orgmode' },
|
||||
},
|
||||
providers = {
|
||||
snippets = {
|
||||
score_offset = -20,
|
||||
|
|
@ -47,6 +51,11 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
orgmode = {
|
||||
name = 'Orgmode',
|
||||
module = 'orgmode.org.autocompletion.blink',
|
||||
fallbacks = { 'buffer' },
|
||||
},
|
||||
},
|
||||
},
|
||||
cmdline = {
|
||||
|
|
|
|||
|
|
@ -51,6 +51,26 @@ return {
|
|||
noremap = true,
|
||||
desc = 'git diff overlay',
|
||||
},
|
||||
{
|
||||
'<leader>gd',
|
||||
function()
|
||||
return MiniGit.show_at_cursor()
|
||||
end,
|
||||
noremap = true,
|
||||
desc = 'git show at cursor',
|
||||
},
|
||||
{
|
||||
'<leader>gb',
|
||||
'<Cmd>Git blame -- %<CR>',
|
||||
noremap = true,
|
||||
desc = 'git blame',
|
||||
},
|
||||
{
|
||||
'<leader>gg',
|
||||
':Git ',
|
||||
noremap = true,
|
||||
desc = 'git command',
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require('mini.basics').setup { mappings = { windows = true } }
|
||||
|
|
@ -96,6 +116,7 @@ return {
|
|||
prefix = 'gR',
|
||||
},
|
||||
}
|
||||
require('mini.git').setup()
|
||||
setup_pairs {
|
||||
modes = { insert = true, command = true, terminal = false },
|
||||
skip_next = [=[[%w%%%'%[%"%.%`%$]]=],
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ return {
|
|||
'MeanderingProgrammer/render-markdown.nvim',
|
||||
event = 'VeryLazy',
|
||||
opts = {
|
||||
ft = { 'markdown', 'codecompanion' },
|
||||
file_types = { 'markdown', 'codecompanion' },
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -109,6 +109,7 @@ return {
|
|||
'neogit',
|
||||
'native_lsp',
|
||||
'diagnostic',
|
||||
'modes',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -148,4 +149,47 @@ return {
|
|||
},
|
||||
},
|
||||
{ 'ThePrimeagen/refactoring.nvim', event = 'VeryLazy', config = true },
|
||||
{
|
||||
'nvim-orgmode/orgmode',
|
||||
event = 'VeryLazy',
|
||||
ft = { 'org' },
|
||||
dependencies = 'nvim-treesitter',
|
||||
keys = {
|
||||
{
|
||||
'<leader>oR',
|
||||
'<cmd>e ~/orgfiles/refile.org<CR>',
|
||||
desc = 'open org refile',
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require('orgmode').setup {
|
||||
org_agenda_files = '~/orgfiles/**/*',
|
||||
org_default_notes_file = '~/orgfiles/refile.org',
|
||||
org_todo_keywords = {
|
||||
'TODO',
|
||||
'IN_PROGRESS',
|
||||
'BLOCKED',
|
||||
'|',
|
||||
'DONE',
|
||||
'NOT DOING',
|
||||
},
|
||||
org_capture_templates = {
|
||||
l = {
|
||||
description = 'Work Log',
|
||||
template = '* %?',
|
||||
target = '~/orgfiles/worklog.org',
|
||||
},
|
||||
},
|
||||
}
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = 'org',
|
||||
callback = function()
|
||||
vim.keymap.set({ 'n', 'i' }, '\\\\', '<cmd>lua require("orgmode").action("org_mappings.meta_return")<CR>', {
|
||||
silent = true,
|
||||
buffer = true,
|
||||
})
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ return {
|
|||
config = function()
|
||||
require('nvim-treesitter.configs').setup {
|
||||
ensure_installed = {},
|
||||
ignore_install = { 'org' },
|
||||
auto_install = false,
|
||||
highlight = {
|
||||
enable = true,
|
||||
|
|
@ -56,12 +57,12 @@ return {
|
|||
goto_next_start = {
|
||||
[']a'] = '@parameter.inner',
|
||||
[']f'] = '@function.outer',
|
||||
['}'] = '@statement.outer',
|
||||
[']]'] = '@statement.outer',
|
||||
},
|
||||
goto_previous_start = {
|
||||
['[a'] = '@parameter.inner',
|
||||
['[f'] = '@function.outer',
|
||||
['{'] = '@statement.outer',
|
||||
['[['] = '@statement.outer',
|
||||
},
|
||||
},
|
||||
swap = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue