Refactor
This commit is contained in:
@@ -14,12 +14,20 @@ plugin({
|
||||
},
|
||||
|
||||
-- (Default) Only show the documentation popup when manually triggered
|
||||
completion = { documentation = { auto_show = true } },
|
||||
completion = {
|
||||
list = {
|
||||
selection = {
|
||||
preselect = false,
|
||||
auto_select = false,
|
||||
},
|
||||
},
|
||||
documentation = { auto_show = true },
|
||||
},
|
||||
|
||||
-- Default list of enabled providers defined so that you can extend it
|
||||
-- elsewhere in your config, without redefining it, due to `opts_extend`
|
||||
sources = {
|
||||
default = { "obsidian", "obsidian_new", "obsidian_tags", "lsp", "path", "snippets", "buffer", "copilot" },
|
||||
default = { "lsp", "path", "snippets", "buffer", "copilot" },
|
||||
-- default = { "obsidian", "obsidian_new", "obsidian_tags", "lsp", "path", "snippets", "buffer" },
|
||||
providers = {
|
||||
snippets = {
|
||||
|
||||
15
lua/_claude.lua
Normal file
15
lua/_claude.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
plugin({
|
||||
"greggh/claude-code.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim", -- Required for git operations
|
||||
},
|
||||
config = function()
|
||||
require("claude-code").setup({
|
||||
shell = {
|
||||
separator = ";", -- Command separator used in shell commands
|
||||
pushd_cmd = "enter", -- Command to push directory onto stack (e.g., 'pushd' for bash/zsh, 'enter' for nushell)
|
||||
popd_cmd = "exit", -- Command to pop directory from stack (e.g., 'popd' for bash/zsh, 'exit' for nushell)
|
||||
},
|
||||
})
|
||||
end,
|
||||
})
|
||||
7
lua/_git.lua
Normal file
7
lua/_git.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
plugin({
|
||||
"FabijanZulj/blame.nvim",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("blame").setup({})
|
||||
end,
|
||||
})
|
||||
@@ -15,3 +15,4 @@ plugin({
|
||||
|
||||
-- vim.lsp.enable("lexical")
|
||||
vim.lsp.enable("pyright")
|
||||
vim.lsp.enable("ts_ls")
|
||||
|
||||
52
lua/_notes.lua
Normal file
52
lua/_notes.lua
Normal file
@@ -0,0 +1,52 @@
|
||||
-- plugin({
|
||||
-- "rebelot/kanagawa.nvim", -- neorg needs a colorscheme with treesitter support
|
||||
-- config = function()
|
||||
-- vim.cmd.colorscheme("kanagawa")
|
||||
-- end,
|
||||
-- })
|
||||
|
||||
plugin({
|
||||
"nvim-neorg/neorg",
|
||||
lazy = false,
|
||||
version = "*",
|
||||
config = function()
|
||||
require("neorg").setup({
|
||||
load = {
|
||||
["core.defaults"] = {},
|
||||
["core.concealer"] = {},
|
||||
["core.dirman"] = {
|
||||
config = {
|
||||
workspaces = {
|
||||
notes = "~/notes/general",
|
||||
quikserve = "~/notes/quikserve",
|
||||
personal = "~/notes/personal",
|
||||
},
|
||||
default_workspace = "notes",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.wo.foldlevel = 99
|
||||
vim.wo.conceallevel = 2
|
||||
end,
|
||||
})
|
||||
|
||||
map("n", "<leader>n", "<cmd>:Neorg index<cr>", { desc = "Neorg index" })
|
||||
map("n", "<leader>nn", "<cmd>:Neorg<cr>", { desc = "Neorg index" })
|
||||
map("n", "<leader>nj", "<cmd>:Neorg journal<cr>", { desc = "Neorg index" })
|
||||
map("n", "<leader>nt", "<cmd>:Neorg journal today<cr>", { desc = "Neorg index" })
|
||||
map("n", "<leader>ni", "<cmd>:Neorg index<cr>", { desc = "Neorg index" })
|
||||
map("n", "<leader>nr", "<cmd>:Neorg return<cr>", { desc = "Neorg return" })
|
||||
map("n", "<leader>nw", function()
|
||||
neorg = require("neorg")
|
||||
local workspaces = {}
|
||||
for k, v in pairs(neorg.config.modules["core.dirman"].workspaces) do
|
||||
table.insert(workspaces, k) -- Inserts the key 'k' into the list
|
||||
end
|
||||
vim.ui.select(workspaces, {}, function(item)
|
||||
if item ~= nil then
|
||||
neorg.modules.loaded_modules["core.dirman"].public.open_workspace(item)
|
||||
end
|
||||
end)
|
||||
end, { desc = "Neorg index" })
|
||||
@@ -1,104 +0,0 @@
|
||||
vim.opt.conceallevel = 1
|
||||
|
||||
plugin({
|
||||
"obsidian-nvim/obsidian.nvim",
|
||||
version = "*", -- recommended, use latest release instead of latest commit
|
||||
lazy = false,
|
||||
ft = "markdown",
|
||||
-- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault:
|
||||
-- event = {
|
||||
-- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'.
|
||||
-- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/*.md"
|
||||
-- -- refer to `:h file-pattern` for more examples
|
||||
-- "BufReadPre path/to/my-vault/*.md",
|
||||
-- "BufNewFile path/to/my-vault/*.md",
|
||||
-- },
|
||||
dependencies = {
|
||||
-- Required.
|
||||
"nvim-lua/plenary.nvim",
|
||||
|
||||
-- see below for full list of optional dependencies 👇
|
||||
},
|
||||
opts = {
|
||||
legacy_commands = false,
|
||||
workspaces = {
|
||||
{
|
||||
name = "personal",
|
||||
path = "~/Documents/obsidian/Personal",
|
||||
},
|
||||
{
|
||||
name = "Quikserve",
|
||||
path = "~/Documents/obsidian/Quikserve",
|
||||
},
|
||||
{
|
||||
name = "Visage",
|
||||
path = "~/Documents/obsidian/Visage",
|
||||
},
|
||||
},
|
||||
notes_subdir = "notes",
|
||||
new_notes_location = "notes_subdir",
|
||||
note_id_func = function(title)
|
||||
-- Create note IDs in a Zettelkasten format with a timestamp and a suffix.
|
||||
-- In this case a note with the title 'My new note' will be given an ID that looks
|
||||
-- like '1657296016-my-new-note', and therefore the file name '1657296016-my-new-note.md'.
|
||||
-- You may have as many periods in the note ID as you'd like—the ".md" will be added automatically
|
||||
local suffix = ""
|
||||
if title ~= nil then
|
||||
-- If title is given, transform it into valid file name.
|
||||
suffix = title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower()
|
||||
else
|
||||
-- If title is nil, just add 4 random uppercase letters to the suffix
|
||||
for _ = 1, 4 do
|
||||
suffix = suffix .. string.char(math.random(65, 90))
|
||||
end
|
||||
end
|
||||
prefix = os.date("%Y%m%d%H%M")
|
||||
return tostring(prefix .. "-" .. suffix)
|
||||
end,
|
||||
daily_notes = {
|
||||
-- Optional, if you keep daily notes in a separate directory.
|
||||
folder = "dailies",
|
||||
-- Optional, if you want to change the date format for the ID of daily notes.
|
||||
date_format = "%Y-%m-%d",
|
||||
-- Optional, if you want to change the date format of the default alias of daily notes.
|
||||
alias_format = "%B %-d, %Y",
|
||||
-- Optional, default tags to add to each new daily note created.
|
||||
default_tags = { "daily-notes" },
|
||||
-- Optional, if you want to automatically insert a template from your template directory like 'daily.md'
|
||||
template = "daily",
|
||||
},
|
||||
templates = {
|
||||
folder = "templates",
|
||||
date_format = "%Y-%m-%d-%a",
|
||||
time_format = "%H:%M",
|
||||
},
|
||||
completion = {
|
||||
blink = true,
|
||||
},
|
||||
picker = {
|
||||
-- Set your preferred picker. Can be one of 'telescope.nvim', 'fzf-lua', or 'mini.pick'.
|
||||
name = "snacks.pick",
|
||||
-- Optional, configure key mappings for the picker. These are the defaults.
|
||||
-- Not all pickers support all mappings.
|
||||
note_mappings = {
|
||||
-- Create a new note from your query.
|
||||
new = "<C-x>",
|
||||
-- Insert a link to the selected note.
|
||||
insert_link = "<C-l>",
|
||||
},
|
||||
tag_mappings = {
|
||||
-- Add tag(s) to current note.
|
||||
tag_note = "<C-x>",
|
||||
-- Insert a tag at the current location.
|
||||
insert_tag = "<C-l>",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
map("n", "<leader>ot", "<cmd>:Obsidian today<cr>", { desc = "Today Note" })
|
||||
map("n", "<leader>on", "<cmd>:Obsidian new<cr>", { desc = "New Note" })
|
||||
map("n", "<leader>oN", "<cmd>:Obsidian new_from_template<cr>", { desc = "New From Template" })
|
||||
map("n", "<leader>ow", "<cmd>:Obsidian workspace<cr>", { desc = "Change Workspace" })
|
||||
map("n", "<leader>oo", "<cmd>::Obsidian quick_switch<cr>", { desc = "Find Note" })
|
||||
map("n", "<leader>os", "<cmd>!./sync.sh<cr>", { desc = "Sync" })
|
||||
@@ -71,7 +71,7 @@ plugin({
|
||||
desc = "Grep",
|
||||
},
|
||||
{
|
||||
"<leader>n",
|
||||
"<leader>N",
|
||||
function()
|
||||
Snacks.picker.notifications()
|
||||
end,
|
||||
@@ -260,13 +260,6 @@ plugin({
|
||||
end,
|
||||
desc = "Select Scratch Buffer",
|
||||
},
|
||||
{
|
||||
"<leader>n",
|
||||
function()
|
||||
Snacks.notifier.show_history()
|
||||
end,
|
||||
desc = "Notification History",
|
||||
},
|
||||
{
|
||||
"<leader>cR",
|
||||
function()
|
||||
|
||||
26
lua/_tea.lua
Normal file
26
lua/_tea.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
plugin({
|
||||
"folke/snacks.nvim",
|
||||
dependencies = {
|
||||
"sbulav/snacks-tea.nvim",
|
||||
},
|
||||
opts = {
|
||||
tea = {
|
||||
enabled = true,
|
||||
tea = {
|
||||
cmd = "tea", -- Path to tea binary
|
||||
login = nil, -- Specific login to use (nil = auto-detect)
|
||||
remote = "origin", -- Git remote to use
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
map("n", "<leader>gp", function()
|
||||
Snacks.tea.pr()
|
||||
end, { desc = "Tea Pull Requests (open)" })
|
||||
map("n", "<leader>gP", function()
|
||||
Snacks.tea.pr({ state = "all" })
|
||||
end, { desc = "Tea Pull Requests (all)" })
|
||||
map("n", "<leader>gc", function()
|
||||
Snacks.tea.pr_create({})
|
||||
end, { desc = "Tea Create Pull Request" })
|
||||
@@ -18,6 +18,10 @@ plugin({
|
||||
"python",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"vimdoc",
|
||||
"c",
|
||||
"vim",
|
||||
"query",
|
||||
},
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
|
||||
@@ -31,6 +31,12 @@ vim.opt.fillchars = { eob = " " }
|
||||
|
||||
vim.o.undofile = true
|
||||
|
||||
--- transparent background
|
||||
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||
-- Optional: also make the border of floating windows transparent
|
||||
vim.api.nvim_set_hl(0, "FloatBorder", { bg = "none" })
|
||||
|
||||
plugin({
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
@@ -76,19 +82,6 @@ plugin({
|
||||
|
||||
map("n", "<leader>tt", "<cmd>:TestNearest<cr>", { desc = "Test Nearest" })
|
||||
|
||||
plugin({
|
||||
"kelly-lin/ranger.nvim",
|
||||
config = function()
|
||||
require("ranger-nvim").setup({ replace_netrw = true })
|
||||
vim.api.nvim_set_keymap("n", "<leader>ff", "", {
|
||||
noremap = true,
|
||||
callback = function()
|
||||
require("ranger-nvim").open(true)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
plugin({
|
||||
"rachartier/tiny-inline-diagnostic.nvim",
|
||||
event = "VeryLazy", -- Or `LspAttach`
|
||||
|
||||
@@ -10,6 +10,7 @@ plugin({
|
||||
css = { "prettier" },
|
||||
html = { "prettier" },
|
||||
html = { "prettier" },
|
||||
typescript = { "deno_fmt" },
|
||||
heex = { "mix" },
|
||||
nix = { "nixfmt" },
|
||||
json = { "prettier" },
|
||||
|
||||
91
lua/plugins/dankcolors.lua
Normal file
91
lua/plugins/dankcolors.lua
Normal file
@@ -0,0 +1,91 @@
|
||||
return {
|
||||
{
|
||||
"RRethy/base16-nvim",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require('base16-colorscheme').setup({
|
||||
base00 = '#131313',
|
||||
base01 = '#131313',
|
||||
base02 = '#5c6370',
|
||||
base03 = '#5c6370',
|
||||
base04 = '#abb2bf',
|
||||
base05 = '#ffffff',
|
||||
base06 = '#ffffff',
|
||||
base07 = '#ffffff',
|
||||
base08 = '#e05f92',
|
||||
base09 = '#e05f92',
|
||||
base0A = '#ffc29e',
|
||||
base0B = '#abe086',
|
||||
base0C = '#997050',
|
||||
base0D = '#ffc29e',
|
||||
base0E = '#b56254',
|
||||
base0F = '#b56254',
|
||||
})
|
||||
|
||||
vim.api.nvim_set_hl(0, 'Visual', {
|
||||
bg = '#5c6370',
|
||||
fg = '#ffffff',
|
||||
bold = true
|
||||
})
|
||||
vim.api.nvim_set_hl(0, 'Statusline', {
|
||||
bg = '#ffc29e',
|
||||
fg = '#131313',
|
||||
})
|
||||
vim.api.nvim_set_hl(0, 'LineNr', { fg = '#5c6370' })
|
||||
vim.api.nvim_set_hl(0, 'CursorLineNr', { fg = '#997050', bold = true })
|
||||
|
||||
vim.api.nvim_set_hl(0, 'Statement', {
|
||||
fg = '#b56254',
|
||||
bold = true
|
||||
})
|
||||
vim.api.nvim_set_hl(0, 'Keyword', { link = 'Statement' })
|
||||
vim.api.nvim_set_hl(0, 'Repeat', { link = 'Statement' })
|
||||
vim.api.nvim_set_hl(0, 'Conditional', { link = 'Statement' })
|
||||
|
||||
vim.api.nvim_set_hl(0, 'Function', {
|
||||
fg = '#ffc29e',
|
||||
bold = true
|
||||
})
|
||||
vim.api.nvim_set_hl(0, 'Macro', {
|
||||
fg = '#ffc29e',
|
||||
italic = true
|
||||
})
|
||||
vim.api.nvim_set_hl(0, '@function.macro', { link = 'Macro' })
|
||||
|
||||
vim.api.nvim_set_hl(0, 'Type', {
|
||||
fg = '#997050',
|
||||
bold = true,
|
||||
italic = true
|
||||
})
|
||||
vim.api.nvim_set_hl(0, 'Structure', { link = 'Type' })
|
||||
|
||||
vim.api.nvim_set_hl(0, 'String', {
|
||||
fg = '#abe086',
|
||||
italic = true
|
||||
})
|
||||
|
||||
vim.api.nvim_set_hl(0, 'Operator', { fg = '#abb2bf' })
|
||||
vim.api.nvim_set_hl(0, 'Delimiter', { fg = '#abb2bf' })
|
||||
vim.api.nvim_set_hl(0, '@punctuation.bracket', { link = 'Delimiter' })
|
||||
vim.api.nvim_set_hl(0, '@punctuation.delimiter', { link = 'Delimiter' })
|
||||
|
||||
vim.api.nvim_set_hl(0, 'Comment', {
|
||||
fg = '#5c6370',
|
||||
italic = true
|
||||
})
|
||||
|
||||
local current_file_path = vim.fn.stdpath("config") .. "/lua/plugins/dankcolors.lua"
|
||||
if not _G._matugen_theme_watcher then
|
||||
local uv = vim.uv or vim.loop
|
||||
_G._matugen_theme_watcher = uv.new_fs_event()
|
||||
_G._matugen_theme_watcher:start(current_file_path, {}, vim.schedule_wrap(function()
|
||||
local new_spec = dofile(current_file_path)
|
||||
if new_spec and new_spec[1] and new_spec[1].config then
|
||||
new_spec[1].config()
|
||||
print("Theme reload")
|
||||
end
|
||||
end))
|
||||
end
|
||||
end
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,9 @@ plugin({
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opts = {},
|
||||
opts = {
|
||||
transparent = true,
|
||||
},
|
||||
init = function()
|
||||
vim.cmd([[colorscheme tokyonight-night]])
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user