mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 16:53:00 +00:00
refractor(nvim): Put lang specific config to plugins/mod/lang
* Local leader to <C-k> * Add org mappings to match emacs behaviour * Put lang specific config to plugins/mod/lang, currently markdown and org
This commit is contained in:
parent
ccaf0ce33e
commit
797ddef79b
11 changed files with 107 additions and 59 deletions
|
|
@ -19,4 +19,4 @@ vim.opt.rtp:prepend(lazypath)
|
|||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
vim.g.maplocalleader = "<C-k>"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
return {
|
||||
{ import = "plugins.mod.nvim-lspconfig" },
|
||||
{ import = "plugins.mod.render-markdown" },
|
||||
-- { import = "plugins.mod.markview" },
|
||||
{
|
||||
"lervag/vimtex",
|
||||
ft = { "tex", "bib" },
|
||||
|
|
@ -41,7 +39,8 @@ return {
|
|||
"NoahTheDuke/vim-just",
|
||||
ft = { "just" },
|
||||
},
|
||||
{ import = "plugins.mod.lang-org" },
|
||||
{ import = "plugins.mod.lang.org" },
|
||||
{ import = "plugins.mod.lang.markdown" },
|
||||
{ import = "plugins.mod.trouble-nvim" },
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
return {
|
||||
{ "wakatime/vim-wakatime", lazy = false },
|
||||
{ "wakatime/vim-wakatime", lazy = false },
|
||||
{ import = "plugins.mod.toggleterm" },
|
||||
{
|
||||
"CRAG666/code_runner.nvim",
|
||||
|
|
@ -18,7 +18,6 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
{ import = "plugins.mod.obsidian-nvim" },
|
||||
{ import = "plugins.mod.which-keys-nvim" },
|
||||
{ import = "plugins.mod.copilot-lua" },
|
||||
{ import = "plugins.mod.avante-nvim" },
|
||||
|
|
|
|||
|
|
@ -1,45 +0,0 @@
|
|||
return {
|
||||
"nvim-orgmode/orgmode",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"nvim-orgmode/telescope-orgmode.nvim",
|
||||
"nvim-orgmode/org-bullets.nvim",
|
||||
"Saghen/blink.cmp",
|
||||
},
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("orgmode").setup({
|
||||
org_agenda_files = "~/OrgFiles/tasks/*",
|
||||
org_default_notes_file = "~/OrgFiles/tasks/inbox.org",
|
||||
org_archive_location = "~/OrgFiles/archive/%s_archive::",
|
||||
org_todo_keywords = { "TODO(t)", "NEXT(n)", "WAIT(w)", "|", "DONE(d)", "CANCELLED(c)" },
|
||||
org_hide_leading_stars = true,
|
||||
org_hide_emphasis_markers = true,
|
||||
org_log_into_drawer = "LOGBOOK",
|
||||
org_highlight_latex_and_related = "native",
|
||||
org_startup_indented = true,
|
||||
org_deadline_warning_days = 10,
|
||||
})
|
||||
require("org-bullets").setup()
|
||||
require("blink.cmp").setup({
|
||||
sources = {
|
||||
per_filetype = {
|
||||
org = { "orgmode" },
|
||||
},
|
||||
providers = {
|
||||
orgmode = {
|
||||
name = "Orgmode",
|
||||
module = "orgmode.org.autocompletion.blink",
|
||||
fallbacks = { "buffer" },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
require("telescope").setup()
|
||||
require("telescope").load_extension("orgmode")
|
||||
vim.keymap.set("n", "<leader>r", require("telescope").extensions.orgmode.refile_heading)
|
||||
vim.keymap.set("n", "<leader>fh", require("telescope").extensions.orgmode.search_headings)
|
||||
vim.keymap.set("n", "<leader>li", require("telescope").extensions.orgmode.insert_link)
|
||||
end,
|
||||
}
|
||||
6
tools/nvim/lua/plugins/mod/lang/markdown/init.lua
Normal file
6
tools/nvim/lua/plugins/mod/lang/markdown/init.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
{ import = "plugins.mod.lang.markdown.render-markdown" },
|
||||
-- { import = "plugins.mod.lang.markdown.markview" },
|
||||
{ import = "plugins.mod.lang.markdown.obsidian-nvim" },
|
||||
{ "bullets-vim/bullets.vim" },
|
||||
}
|
||||
|
|
@ -14,14 +14,13 @@ return {
|
|||
top_pad = 0,
|
||||
bottom_pad = 0,
|
||||
},
|
||||
heading = {
|
||||
sign = false,
|
||||
position = "inline",
|
||||
width = "block",
|
||||
left_margin = 0.5,
|
||||
left_pad = 0.2,
|
||||
right_pad = 0.2,
|
||||
},
|
||||
-- heading = {
|
||||
-- position = "overlay",
|
||||
-- width = "block",
|
||||
-- left_margin = 0.5,
|
||||
-- left_pad = 0.2,
|
||||
-- right_pad = 0.2,
|
||||
-- },
|
||||
link = {
|
||||
custom = {
|
||||
python = { pattern = "%.py", icon = " " },
|
||||
82
tools/nvim/lua/plugins/mod/lang/org.lua
Normal file
82
tools/nvim/lua/plugins/mod/lang/org.lua
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
return {
|
||||
{
|
||||
"nvim-orgmode/orgmode",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"nvim-orgmode/telescope-orgmode.nvim",
|
||||
"nvim-orgmode/org-bullets.nvim",
|
||||
"Saghen/blink.cmp",
|
||||
},
|
||||
cmd = {
|
||||
"Org",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>A", "<cmd>Org agenda<CR>", desc = "Org Agenda" },
|
||||
},
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("orgmode").setup({
|
||||
org_agenda_files = "~/OrgFiles/tasks/*",
|
||||
org_default_notes_file = "~/OrgFiles/tasks/inbox.org",
|
||||
org_archive_location = "~/OrgFiles/archive/%s_archive::",
|
||||
org_todo_keywords = { "TODO(t)", "NEXT(n)", "WAIT(w)", "|", "DONE(d)", "CANCELLED(c)" },
|
||||
org_hide_leading_stars = true,
|
||||
org_hide_emphasis_markers = true,
|
||||
org_log_into_drawer = "LOGBOOK",
|
||||
org_highlight_latex_and_related = "native",
|
||||
org_startup_indented = true,
|
||||
org_deadline_warning_days = 10,
|
||||
mappings = {
|
||||
agenda = {
|
||||
org_agenda_schedule = "<C-c><C-s>",
|
||||
org_agenda_deadline = "<C-c><C-d>",
|
||||
org_agenda_todo = "<C-c><C-t>",
|
||||
org_agenda_set_tags = "<C-c><C-c>",
|
||||
org_agenda_earlier = { "[[", "<" },
|
||||
org_agenda_later = { "]]", ">" },
|
||||
},
|
||||
org = {
|
||||
org_deadline = "<C-c><C-d>",
|
||||
org_schedule = "<C-c><C-s>",
|
||||
org_todo = "<C-c><C-t>",
|
||||
org_set_tags_command = "<C-c><C-c>",
|
||||
},
|
||||
},
|
||||
})
|
||||
require("org-bullets").setup()
|
||||
require("blink.cmp").setup({
|
||||
sources = {
|
||||
per_filetype = {
|
||||
org = { "orgmode" },
|
||||
},
|
||||
providers = {
|
||||
orgmode = {
|
||||
name = "Orgmode",
|
||||
module = "orgmode.org.autocompletion.blink",
|
||||
fallbacks = { "buffer" },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
require("telescope").setup()
|
||||
require("telescope").load_extension("orgmode")
|
||||
-- vim.keymap.set("n", "<leader>r", require("telescope").extensions.orgmode.refile_heading)
|
||||
vim.keymap.set("n", "<leader>oP", require("telescope").extensions.orgmode.search_headings)
|
||||
vim.keymap.set("n", "<leader>op", "<cmd>Telescope find_files cwd=~/OrgFiles<CR>")
|
||||
-- vim.keymap.set("n", "<leader>li", require("telescope").extensions.orgmode.insert_link)
|
||||
end,
|
||||
},
|
||||
-- {
|
||||
-- dir = "~/Source/org-pomodoro.nvim",
|
||||
-- name = "org-pomodoro.nvim",
|
||||
-- lazy = false,
|
||||
-- opts = {},
|
||||
-- dependencies = {
|
||||
-- "nvim-orgmode/orgmode",
|
||||
-- },
|
||||
-- cmd = {
|
||||
-- "OrgPomodoro",
|
||||
-- },
|
||||
-- },
|
||||
}
|
||||
|
|
@ -112,6 +112,13 @@ M.progress = {
|
|||
"progress",
|
||||
}
|
||||
|
||||
-- TODO: Implement orgmode
|
||||
M.orgmode = {
|
||||
function()
|
||||
return _G.orgmode.statusline()
|
||||
end,
|
||||
}
|
||||
|
||||
-- local conditions = {
|
||||
-- buffer_not_empty = function()
|
||||
-- return vim.fn.empty(vim.fn.expand("%:t")) ~= 1
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ local config = {
|
|||
components.diagnostics,
|
||||
},
|
||||
lualine_x = {
|
||||
components.orgmode,
|
||||
components.indent,
|
||||
components.encoding,
|
||||
components.eol,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue