Add nabla and taskwarrior plugins

TODO taskwarrior needs fixing for proper use
Enable nable virt text in neorg files
Add Alpha shortcuts for neorg workspaces
This commit is contained in:
Evie Litherland-Smith 2023-07-19 11:55:22 +01:00
parent 06d49fef39
commit 85cc28db9d
5 changed files with 66 additions and 10 deletions

View file

@ -14,15 +14,17 @@ return {
dashboard.section.header.val = vim.split(logo, "\n")
dashboard.section.buttons.val = {
dashboard.button("t", "" .. " Terminal", "<cmd>ToggleTerm <CR>"),
dashboard.button("f", "" .. " Find file", "<cmd>Telescope find_files <CR>"),
dashboard.button("r", "" .. " Recent files", "<cmd>Telescope oldfiles <CR>"),
dashboard.button("o", "" .. " File browser", "<cmd>Oil <CR>"),
dashboard.button("g", "󰊢 " .. " Git status", "<cmd>Neogit <CR>"),
dashboard.button("c", "" .. " Config", "<cmd>e $HOME/.config/home-manager/flake.nix <CR>"),
dashboard.button("l", "󰒲 " .. " Lazy", "<cmd>Lazy<CR>"),
dashboard.button("h", "" .. " Help", "<cmd>Telescope help_tags <CR>"),
dashboard.button("q", "" .. " Quit", "<cmd>qa<CR>"),
dashboard.button("t", " Terminal", "<cmd>ToggleTerm <CR>"),
dashboard.button("f", " Find file", "<cmd>Telescope find_files <CR>"),
dashboard.button("r", " Recent files", "<cmd>Telescope oldfiles <CR>"),
dashboard.button("o", " File browser", "<cmd>Oil <CR>"),
dashboard.button("p", "󱞁 Personal notes", "<cmd>Neorg workspace personal<CR>"),
dashboard.button("w", "󱞂 Work notes", "<cmd>Neorg workspace work<CR>"),
dashboard.button("g", "󰊢 Git status", "<cmd>Neogit <CR>"),
dashboard.button("c", " Config", "<cmd>e $HOME/.config/home-manager/flake.nix <CR>"),
dashboard.button("l", "󰒲 Lazy", "<cmd>Lazy<CR>"),
dashboard.button("h", " Help", "<cmd>Telescope help_tags <CR>"),
dashboard.button("q", " Quit", "<cmd>qa<CR>"),
}
for _, button in ipairs(dashboard.section.buttons.val) do
button.opts.hl = "AlphaButtons"

8
lua/plugins/nabla.lua Normal file
View file

@ -0,0 +1,8 @@
return {
"jbyuki/nabla.nvim",
lazy = true,
init = function()
vim.keymap.set("n", "<leader>p", "<cmd>lua require('nabla').popup()<cr>")
vim.keymap.set("n", "<leader>m", "<cmd>lua require('nabla').toggle_virt()<cr>")
end,
}

35
lua/plugins/noice.lua Normal file
View file

@ -0,0 +1,35 @@
return {
"folke/noice.nvim",
enabled = false,
cond = not vim.g.neovide,
event = { "VeryLazy" },
dependencies = {
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
"stevearc/dressing.nvim",
},
config = true,
opts = {
presets = {
bottom_search = true,
command_palette = true,
long_message_to_split = true,
inc_rename = false,
lsp_doc_border = true,
},
lsp = {
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
},
views = {
mini = {
position = { row = -2 },
border = { style = "rounded" },
win_options = { winblend = 0 },
},
},
},
}

View file

@ -5,7 +5,7 @@ return {
ft = "norg",
cmd = "Neorg",
lazy = true,
dependencies = { "plenary.nvim", "nvim-treesitter", "nvim-cmp" },
dependencies = { "plenary.nvim", "nvim-treesitter", "nvim-cmp", "nabla.nvim" },
init = function()
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
pattern = { "*.norg" },
@ -15,6 +15,10 @@ return {
pattern = { "*.norg" },
command = "setlocal spell spelllang=en_gb",
})
vim.api.nvim_create_autocmd({ "BufReadPost", "BufNewFile" }, {
pattern = { "*.norg" },
command = "lua require('nabla').enable_virt()",
})
vim.keymap.set("n", "<leader>wp", "<cmd>Neorg workspace personal <cr>")
vim.keymap.set("n", "<leader>ww", "<cmd>Neorg workspace work <cr>")
vim.keymap.set("n", "<leader>wr", "<cmd>Neorg return <cr>")

View file

@ -0,0 +1,7 @@
return {
"ribelo/taskwarrior.nvim",
cond = false, -- TODO, currently broken but easy fix tbh
cmd = "Task",
opts = {},
config = function() require("taskwarrior.nvim").setup() end,
}