Merge remote-tracking branch 'origin/nixos' into nixos
This commit is contained in:
commit
69454aba52
74 changed files with 943 additions and 945 deletions
|
|
@ -49,14 +49,17 @@ in
|
|||
extraPackages = with pkgs; [
|
||||
alejandra
|
||||
black
|
||||
deadnix
|
||||
isort
|
||||
jq
|
||||
nil
|
||||
nixpkgs-fmt
|
||||
nodePackages.bash-language-server
|
||||
nodePackages.cspell
|
||||
rustfmt
|
||||
shellcheck
|
||||
shfmt
|
||||
statix
|
||||
stylua
|
||||
sumneko-lua-language-server
|
||||
taplo
|
||||
|
|
@ -68,7 +71,7 @@ in
|
|||
cmp_luasnip
|
||||
copilot-cmp
|
||||
direnv-vim
|
||||
impatient-nvim
|
||||
friendly-snippets
|
||||
lsp_lines-nvim
|
||||
lspkind-nvim
|
||||
lspsaga-nvim-original
|
||||
|
|
|
|||
|
|
@ -1,39 +1,15 @@
|
|||
require("impatient")
|
||||
|
||||
---merge tables
|
||||
---@param ... table[]
|
||||
---@return table
|
||||
local function table_merge(...)
|
||||
local tables_to_merge = { ... }
|
||||
assert(#tables_to_merge > 1, "There should be at least two tables to merge them")
|
||||
|
||||
for k, t in ipairs(tables_to_merge) do
|
||||
assert(type(t) == "table", string.format("Expected a table as function parameter %d", k))
|
||||
end
|
||||
|
||||
local result = tables_to_merge[1]
|
||||
|
||||
for i = 2, #tables_to_merge do
|
||||
local from = tables_to_merge[i]
|
||||
for k, v in pairs(from) do
|
||||
if type(v) == "table" then
|
||||
result[k] = result[k] or {}
|
||||
result[k] = table_merge(result[k], v)
|
||||
else
|
||||
result[k] = v
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return result
|
||||
end
|
||||
vim.loader.enable()
|
||||
|
||||
-- Load custom treesitter grammar for org filetype
|
||||
require("orgmode").setup_ts_grammar()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
sync_install = false,
|
||||
auto_install = false,
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
-- Required for spellcheck, some LaTex highlights and
|
||||
-- code block highlights that do not have ts grammar
|
||||
additional_vim_regex_highlighting = { "org" },
|
||||
},
|
||||
})
|
||||
|
||||
|
|
@ -42,6 +18,7 @@ vim.api.nvim_create_autocmd("InsertEnter", {
|
|||
callback = function()
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
require("copilot_cmp").setup()
|
||||
|
||||
local default_sources = {
|
||||
|
|
@ -97,7 +74,7 @@ vim.api.nvim_create_autocmd("InsertEnter", {
|
|||
})
|
||||
|
||||
cmp.setup.filetype("org", {
|
||||
sources = table_merge(default_sources, {
|
||||
sources = vim.tbl_deep_extend("force", default_sources, {
|
||||
{ name = "buffer", priority = 5 },
|
||||
{ name = "orgmode", priority = 5 },
|
||||
}),
|
||||
|
|
@ -167,11 +144,8 @@ require("lspsaga").setup({
|
|||
enable = false,
|
||||
},
|
||||
lightbulb = {
|
||||
enable = true,
|
||||
enable_in_insert = true,
|
||||
sign = true,
|
||||
sign_priority = 40,
|
||||
virtual_text = false,
|
||||
enable = false,
|
||||
enable_in_insert = false,
|
||||
},
|
||||
})
|
||||
|
||||
|
|
@ -181,10 +155,7 @@ local on_attach_def = function(_, bufnr)
|
|||
K = { "<cmd>Lspsaga hover_doc ++quiet<cr>", "show info" },
|
||||
["<leader>"] = {
|
||||
l = {
|
||||
name = "lsp",
|
||||
d = { "<cmd>Lspsaga show_cursor_diagnostics<cr>", "open diagnostic window" },
|
||||
n = { "<cmd>Lspsaga diagnostic_jump_next<CR>", "next error" },
|
||||
p = { "<cmd>Lspsaga diagnostic_jump_prev<CR>", "prev error" },
|
||||
c = { "<cmd>Lspsaga code_action<cr>", "code action" },
|
||||
r = { "<cmd>Lspsaga rename<cr>", "rename" },
|
||||
i = { "<cmd>Lspsaga hover_doc ++keep<cr>", "show info (sticky)" },
|
||||
|
|
@ -196,27 +167,23 @@ local on_attach_def = function(_, bufnr)
|
|||
mode = { "n", "v" },
|
||||
},
|
||||
},
|
||||
w = {
|
||||
name = "workspace",
|
||||
a = { vim.lsp.buf.add_workspace_folder, "add workspace folder" },
|
||||
r = { vim.lsp.buf.remove_workspace_folder, "remove workspace folder" },
|
||||
l = {
|
||||
function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end,
|
||||
"list workspace folders",
|
||||
},
|
||||
},
|
||||
t = {
|
||||
name = "toggle",
|
||||
l = { lsp_lines.toggle, "lsp lines" },
|
||||
},
|
||||
},
|
||||
g = {
|
||||
name = "goto",
|
||||
d = { "<cmd>Lspsaga peek_definition<cr>", "definition" },
|
||||
t = { "<cmd>Lspsaga peek_type_definition<cr>", "type defininition" },
|
||||
h = { "<cmd>Lspsaga lsp_finder<CR>", "lsp finder" },
|
||||
d = { "<cmd>Lspsaga peek_definition<cr>", "Goto definition" },
|
||||
t = { "<cmd>Lspsaga peek_type_definition<cr>", "Goto type defininition" },
|
||||
h = { "<cmd>Lspsaga lsp_finder<CR>", "Lsp finder" },
|
||||
r = { "<cmd>Telescope lsp_references<cr>", "Goto reference" },
|
||||
D = { vim.lsp.buf.declaration, "Goto declaration" },
|
||||
I = { "<cmd>Telescope lsp_implementations<cr>", "Goto implementation" },
|
||||
},
|
||||
["["] = {
|
||||
d = { "<cmd>Lspsaga diagnostic_jump_prev<cr>", "Previous diagnostic" },
|
||||
},
|
||||
["]"] = {
|
||||
d = { "<cmd>Lspsaga diagnostic_jump_next<cr>", "Next diagnostic" },
|
||||
},
|
||||
}, { buffer = bufnr, silent = true })
|
||||
end
|
||||
|
|
@ -234,7 +201,7 @@ local lspconfig_default_options = {
|
|||
---@param options table
|
||||
---@return nil
|
||||
local function lspconfig_setup(lsp, options)
|
||||
local final_options = table_merge(lspconfig_default_options, options)
|
||||
local final_options = vim.tbl_deep_extend("force", lspconfig_default_options, options)
|
||||
lspconfig[lsp].setup(final_options)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,74 @@
|
|||
-- buffers
|
||||
-- buffer
|
||||
require("which-key").register({
|
||||
b = {
|
||||
name = "buffers",
|
||||
name = "buffer",
|
||||
b = { "<cmd>Telescope buffers<cr>", "List buffers" },
|
||||
d = { "<cmd>bd<cr>", "Delete buffer" },
|
||||
n = { "<cmd>bnext<cr>", "Next buffer" },
|
||||
p = { "<cmd>bprevious<cr>", "Previous buffer" },
|
||||
},
|
||||
})
|
||||
|
||||
-- window
|
||||
require("which-key").register({
|
||||
w = {
|
||||
name = "window",
|
||||
["|"] = { "<C-w>v", "Split window horizontally" },
|
||||
["-"] = { "<C-w>s", "Split window vertically" },
|
||||
w = { "<C-w>w", "Switch window" },
|
||||
d = { "<C-w>c", "Delete window" },
|
||||
},
|
||||
}, { prefix = "<leader>" })
|
||||
require("which-key").register({
|
||||
["["] = {
|
||||
b = { "<cmd>bprevious<cr>", "Previous buffer" },
|
||||
},
|
||||
["]"] = {
|
||||
b = { "<cmd>bnext<cr>", "Next buffer" },
|
||||
},
|
||||
})
|
||||
|
||||
-- fast window move
|
||||
require("which-key").register({
|
||||
["<C-h>"] = { "<C-w>h", "Move window left" },
|
||||
["<C-j>"] = { "<C-w>j", "Move window down" },
|
||||
["<C-k>"] = { "<C-w>k", "Move window up" },
|
||||
["<C-l>"] = { "<C-w>l", "Move window right" },
|
||||
})
|
||||
|
||||
-- tab
|
||||
require("which-key").register({
|
||||
["<tab>"] = {
|
||||
name = "tab",
|
||||
["<tab>"] = { "<cmd>tabnew<cr>", "New tab" },
|
||||
n = { "<cmd>tabnext<cr>", "Next tab" },
|
||||
p = { "<cmd>tabprevious<cr>", "Previous tab" },
|
||||
d = { "<cmd>tabclose<cr>", "Close tab" },
|
||||
},
|
||||
}, { prefix = "<leader>" })
|
||||
|
||||
-- file
|
||||
require("which-key").register({
|
||||
f = {
|
||||
name = "file/find",
|
||||
n = { "<cmd>enew<cr>", "New file" },
|
||||
},
|
||||
}, { prefix = "<leader>" })
|
||||
|
||||
-- better descriptions for navigation
|
||||
require("which-key").register({
|
||||
["<leader>"] = {
|
||||
f = { name = "file/find" },
|
||||
g = { name = "git" },
|
||||
l = { name = "lsp" },
|
||||
o = { name = "org" },
|
||||
s = { name = "search" },
|
||||
t = { name = "toggle" },
|
||||
x = { name = "diagnostics/quickfix" },
|
||||
},
|
||||
["["] = { name = "prev" },
|
||||
["]"] = { name = "next" },
|
||||
g = { name = "goto" },
|
||||
})
|
||||
|
||||
-- Clear search with <esc>
|
||||
require("which-key").register({
|
||||
["<esc>"] = { "<cmd>noh<cr><esc>", "Escape and clear hlsearch", mode = { "n", "i" } },
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
require("telescope").load_extension("advanced_git_search")
|
||||
local advanced_git_search = require("telescope").extensions.advanced_git_search
|
||||
vim.api.nvim_create_user_command(
|
||||
"DiffCommitLine",
|
||||
"lua require('telescope').extensions.advanced_git_search.diff_commit_line()",
|
||||
{ range = true }
|
||||
)
|
||||
require("which-key").register({
|
||||
g = {
|
||||
name = "git",
|
||||
b = { advanced_git_search.diff_branch_file, "diff branch file" },
|
||||
l = { vim.cmd.DiffCommitLine, "diff commit line", mode = "v" },
|
||||
f = { advanced_git_search.diff_commit_file, "diff commit file" },
|
||||
c = { advanced_git_search.search_log_content, "search log content" },
|
||||
C = { advanced_git_search.search_log_content_file, "search log content current file" },
|
||||
r = { advanced_git_search.checkout_reflog, "checkout reflog" },
|
||||
},
|
||||
}, { prefix = "<leader>" })
|
||||
1
modules/programs/nvim/plugins/comment-box-nvim.lua
Normal file
1
modules/programs/nvim/plugins/comment-box-nvim.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
require("comment-box").setup()
|
||||
3
modules/programs/nvim/plugins/gitignore-nvim.lua
Normal file
3
modules/programs/nvim/plugins/gitignore-nvim.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
require("which-key").register({
|
||||
i = { "<cmd>Gitignore<cr>", "Create .gitignore" },
|
||||
}, { prefix = "<leader>g" })
|
||||
|
|
@ -1 +1,22 @@
|
|||
require("gitsigns").setup()
|
||||
require("which-key").register({
|
||||
["["] = {
|
||||
h = { "<cmd>Gitsigns prev_hunk<cr>", "Previous hunk" },
|
||||
},
|
||||
["]"] = {
|
||||
h = { "<cmd>Gitsigns next_hunk<cr>", "Next hunk" },
|
||||
},
|
||||
})
|
||||
require("which-key").register({
|
||||
h = {
|
||||
name = "hunk",
|
||||
s = { "<cmd>Gitsigns stage_hunk<cr>", "Stage hunk", mode = { "n", "v" } },
|
||||
r = { "<cmd>Gitsigns reset_hunk<cr>", "Reset hunk", mode = { "n", "v" } },
|
||||
S = { "<cmd>Gitsigns stage_buffer<cr>", "Stage buffer" },
|
||||
R = { "<cmd>Gitsigns reset_buffer<cr>", "Reset buffer" },
|
||||
u = { "<cmd>Gitsigns undo_stage_hunk<cr>", "Undo stage hunk" },
|
||||
},
|
||||
}, { prefix = "<leader>g" })
|
||||
require("which-key").register({
|
||||
h = { ":<C-U>Gitsigns select_hunk<cr>", "Gitsigns select hunk" },
|
||||
}, { prefix = "i", mode = { "o", "x" } })
|
||||
|
|
|
|||
195
modules/programs/nvim/plugins/neo-tree-nvim.lua
Normal file
195
modules/programs/nvim/plugins/neo-tree-nvim.lua
Normal file
|
|
@ -0,0 +1,195 @@
|
|||
-- Unless you are still migrating, remove the deprecated commands from v1.x
|
||||
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
|
||||
|
||||
require("neo-tree").setup({
|
||||
close_if_last_window = true, -- Close Neo-tree if it is the last window left in the tab
|
||||
popup_border_style = "rounded",
|
||||
enable_git_status = true,
|
||||
enable_diagnostics = true,
|
||||
open_files_do_not_replace_types = { "terminal", "trouble", "qf" }, -- when opening files, do not use windows containing these filetypes or buftypes
|
||||
sort_case_insensitive = false, -- used when sorting files and directories in the tree
|
||||
sort_function = nil, -- use a custom function for sorting files and directories in the tree
|
||||
-- sort_function = function (a,b)
|
||||
-- if a.type == b.type then
|
||||
-- return a.path > b.path
|
||||
-- else
|
||||
-- return a.type > b.type
|
||||
-- end
|
||||
-- end , -- this sorts files and directories descendantly
|
||||
default_component_configs = {
|
||||
container = {
|
||||
enable_character_fade = true,
|
||||
},
|
||||
indent = {
|
||||
indent_size = 2,
|
||||
padding = 1, -- extra padding on left hand side
|
||||
-- indent guides
|
||||
with_markers = true,
|
||||
indent_marker = "│",
|
||||
last_indent_marker = "└",
|
||||
highlight = "NeoTreeIndentMarker",
|
||||
-- expander config, needed for nesting files
|
||||
with_expanders = nil, -- if nil and file nesting is enabled, will enable expanders
|
||||
expander_collapsed = "",
|
||||
expander_expanded = "",
|
||||
expander_highlight = "NeoTreeExpander",
|
||||
},
|
||||
icon = {
|
||||
folder_closed = "",
|
||||
folder_open = "",
|
||||
folder_empty = "ﰊ",
|
||||
-- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there
|
||||
-- then these will never be used.
|
||||
default = "*",
|
||||
highlight = "NeoTreeFileIcon",
|
||||
},
|
||||
modified = {
|
||||
symbol = "[+]",
|
||||
highlight = "NeoTreeModified",
|
||||
},
|
||||
name = {
|
||||
trailing_slash = false,
|
||||
use_git_status_colors = true,
|
||||
highlight = "NeoTreeFileName",
|
||||
},
|
||||
git_status = {
|
||||
symbols = {
|
||||
-- Change type
|
||||
added = "", -- or "✚", but this is redundant info if you use git_status_colors on the name
|
||||
modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
|
||||
deleted = "✖", -- this can only be used in the git_status source
|
||||
renamed = "", -- this can only be used in the git_status source
|
||||
-- Status type
|
||||
untracked = "",
|
||||
ignored = "",
|
||||
unstaged = "",
|
||||
staged = "",
|
||||
conflict = "",
|
||||
},
|
||||
},
|
||||
},
|
||||
window = {
|
||||
position = "left",
|
||||
width = 40,
|
||||
mapping_options = {
|
||||
noremap = true,
|
||||
nowait = true,
|
||||
},
|
||||
mappings = {
|
||||
["<cr>"] = "open",
|
||||
["<esc>"] = "revert_preview",
|
||||
["P"] = { "toggle_preview", config = { use_float = false } },
|
||||
["S"] = "open_split",
|
||||
["s"] = "open_vsplit",
|
||||
["t"] = "open_tabnew",
|
||||
["C"] = "close_node",
|
||||
["z"] = "close_all_nodes",
|
||||
["a"] = {
|
||||
"add",
|
||||
-- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). see `:h neo-tree-file-actions` for details
|
||||
-- some commands may take optional config options, see `:h neo-tree-mappings` for details
|
||||
config = {
|
||||
show_path = "none", -- "none", "relative", "absolute"
|
||||
},
|
||||
},
|
||||
["A"] = "add_directory", -- also accepts the optional config.show_path option like "add". this also supports BASH style brace expansion.
|
||||
["d"] = "delete",
|
||||
["r"] = "rename",
|
||||
["y"] = "copy_to_clipboard",
|
||||
["x"] = "cut_to_clipboard",
|
||||
["p"] = "paste_from_clipboard",
|
||||
["c"] = "copy", -- takes text input for destination, also accepts the optional config.show_path option like "add":
|
||||
["m"] = "move", -- takes text input for destination, also accepts the optional config.show_path option like "add".
|
||||
["q"] = "close_window",
|
||||
["R"] = "refresh",
|
||||
["?"] = "show_help",
|
||||
["<"] = "prev_source",
|
||||
[">"] = "next_source",
|
||||
},
|
||||
},
|
||||
nesting_rules = {},
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
visible = false, -- when true, they will just be displayed differently than normal items
|
||||
hide_dotfiles = true,
|
||||
hide_gitignored = true,
|
||||
hide_hidden = true, -- only works on Windows for hidden files/directories
|
||||
hide_by_name = {
|
||||
--"node_modules"
|
||||
},
|
||||
hide_by_pattern = { -- uses glob style patterns
|
||||
--"*.meta",
|
||||
--"*/src/*/tsconfig.json",
|
||||
},
|
||||
always_show = { -- remains visible even if other settings would normally hide it
|
||||
--".gitignored",
|
||||
},
|
||||
never_show = { -- remains hidden even if visible is toggled to true, this overrides always_show
|
||||
--".DS_Store",
|
||||
--"thumbs.db"
|
||||
},
|
||||
never_show_by_pattern = { -- uses glob style patterns
|
||||
--".null-ls_*",
|
||||
},
|
||||
},
|
||||
follow_current_file = false, -- This will find and focus the file in the active buffer every
|
||||
-- time the current file is changed while the tree is open.
|
||||
group_empty_dirs = false, -- when true, empty folders will be grouped together
|
||||
hijack_netrw_behavior = "disabled", -- netrw disabled, opening a directory opens neo-tree
|
||||
-- in whatever position is specified in window.position
|
||||
-- "open_current", -- netrw disabled, opening a directory opens within the
|
||||
-- window like netrw would, regardless of window.position
|
||||
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
|
||||
use_libuv_file_watcher = false, -- This will use the OS level file watchers to detect changes
|
||||
-- instead of relying on nvim autocmd events.
|
||||
window = {
|
||||
mappings = {
|
||||
["<bs>"] = "navigate_up",
|
||||
["."] = "set_root",
|
||||
["H"] = "toggle_hidden",
|
||||
["/"] = "fuzzy_finder",
|
||||
["D"] = "fuzzy_finder_directory",
|
||||
["#"] = "fuzzy_sorter", -- fuzzy sorting using the fzy algorithm
|
||||
["f"] = "filter_on_submit",
|
||||
["<c-x>"] = "clear_filter",
|
||||
["[g"] = "prev_git_modified",
|
||||
["]g"] = "next_git_modified",
|
||||
},
|
||||
fuzzy_finder_mappings = { -- define keymaps for filter popup window in fuzzy_finder_mode
|
||||
["<S-tab>"] = "move_cursor_up",
|
||||
["<tab>"] = "move_cursor_down",
|
||||
},
|
||||
},
|
||||
},
|
||||
buffers = {
|
||||
follow_current_file = true, -- This will find and focus the file in the active buffer every
|
||||
-- time the current file is changed while the tree is open.
|
||||
group_empty_dirs = true, -- when true, empty folders will be grouped together
|
||||
show_unloaded = true,
|
||||
window = {
|
||||
mappings = {
|
||||
["bd"] = "buffer_delete",
|
||||
["<bs>"] = "navigate_up",
|
||||
["."] = "set_root",
|
||||
},
|
||||
},
|
||||
},
|
||||
git_status = {
|
||||
window = {
|
||||
position = "float",
|
||||
mappings = {
|
||||
["A"] = "git_add_all",
|
||||
["gu"] = "git_unstage_file",
|
||||
["ga"] = "git_add_file",
|
||||
["gr"] = "git_revert_file",
|
||||
["gc"] = "git_commit",
|
||||
["gp"] = "git_push",
|
||||
["gg"] = "git_commit_and_push",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
require("which-key").register({
|
||||
t = { "<cmd>Neotree toggle reveal<cr>", "Neotree" },
|
||||
}, { prefix = "<leader>t", silent = true })
|
||||
58
modules/programs/nvim/plugins/null-ls-nvim.lua
Normal file
58
modules/programs/nvim/plugins/null-ls-nvim.lua
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
local null_ls = require("null-ls")
|
||||
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
-- Code actions
|
||||
null_ls.builtins.code_actions.cspell,
|
||||
null_ls.builtins.code_actions.gitsigns,
|
||||
null_ls.builtins.code_actions.shellcheck,
|
||||
null_ls.builtins.code_actions.statix,
|
||||
-- Completion
|
||||
null_ls.builtins.completion.spell,
|
||||
-- Diagnostics
|
||||
null_ls.builtins.diagnostics.cspell,
|
||||
null_ls.builtins.diagnostics.deadnix,
|
||||
null_ls.builtins.diagnostics.shellcheck,
|
||||
null_ls.builtins.diagnostics.statix,
|
||||
},
|
||||
})
|
||||
|
||||
-- disable cspell initially
|
||||
null_ls.disable("cspell")
|
||||
|
||||
-- make sources toggle able
|
||||
require("which-key").register({
|
||||
n = {
|
||||
name = "null-ls",
|
||||
c = {
|
||||
function()
|
||||
null_ls.toggle("cspell")
|
||||
end,
|
||||
"cspell",
|
||||
},
|
||||
g = {
|
||||
function()
|
||||
null_ls.toggle("gitsigns")
|
||||
end,
|
||||
"gitsigns",
|
||||
},
|
||||
s = {
|
||||
function()
|
||||
null_ls.toggle("shellcheck")
|
||||
end,
|
||||
"shellcheck",
|
||||
},
|
||||
S = {
|
||||
function()
|
||||
null_ls.toggle("statix")
|
||||
end,
|
||||
"statix",
|
||||
},
|
||||
d = {
|
||||
function()
|
||||
null_ls.toggle("deadnix")
|
||||
end,
|
||||
"deadnix",
|
||||
},
|
||||
},
|
||||
}, { prefix = "<leader>t" })
|
||||
|
|
@ -1 +1 @@
|
|||
require("nvim-surround").setup({})
|
||||
require("nvim-surround").setup()
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
-- disable netrw at the very start of your init.lua (strongly advised)
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
-- set termguicolors to enable highlight groups
|
||||
vim.opt.termguicolors = true
|
||||
-- empty setup using defaults
|
||||
require("nvim-tree").setup()
|
||||
require("which-key").register({
|
||||
t = { "<cmd>NvimTreeFindFileToggle<cr>", "nvim tree" },
|
||||
}, { prefix = "<leader>t", silent = true })
|
||||
|
|
@ -1,18 +1,4 @@
|
|||
local orgmode = require("orgmode")
|
||||
-- Load custom treesitter grammar for org filetype
|
||||
orgmode.setup_ts_grammar()
|
||||
-- Treesitter configuration
|
||||
require("nvim-treesitter.configs").setup({
|
||||
-- If TS highlights are not enabled at all, or disabled via `disable` prop,
|
||||
-- highlighting will fallback to default Vim syntax highlighting
|
||||
highlight = {
|
||||
enable = true,
|
||||
-- Required for spellcheck, some LaTex highlights and
|
||||
-- code block highlights that do not have ts grammar
|
||||
additional_vim_regex_highlighting = { "org" },
|
||||
},
|
||||
})
|
||||
orgmode.setup({
|
||||
require("orgmode").setup({
|
||||
org_agenda_files = { "~/Notes/org" },
|
||||
org_default_notes_file = "~/Notes/org/refile.org",
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,9 +1,22 @@
|
|||
require("which-key").register({
|
||||
f = {
|
||||
name = "find",
|
||||
f = { "<cmd>Telescope find_files<cr>", "find file" },
|
||||
l = { "<cmd>Telescope current_buffer_fuzzy_find<cr>", "find line" },
|
||||
g = { "<cmd>Telescope live_grep<cr>", "live grep" },
|
||||
b = { "<cmd>Telescope buffers<cr>", "find buffer" },
|
||||
f = { "<cmd>Telescope find_files<cr>", "Find files" },
|
||||
b = { "<cmd>Telescope buffers<cr>", "Find buffers" },
|
||||
r = { "<cmd>Telescope oldfiles<cr>", "Find recent files" },
|
||||
},
|
||||
s = {
|
||||
l = { "<cmd>Telescope current_buffer_fuzzy_find<cr>", "Search lines" },
|
||||
g = { "<cmd>Telescope live_grep<cr>", "Live grep" },
|
||||
c = { "<cmd>Telescope command_history<cr>", "Command history" },
|
||||
C = { "<cmd>Telescope commands<cr>", "Commands" },
|
||||
d = { "<cmd>Telescope diagnostics<cr>", "Diagnostics" },
|
||||
h = { "<cmd>Telescope help_tags<cr>", "Help tags" },
|
||||
k = { "<cmd>Telescope keymaps<cr>", "Keymaps" },
|
||||
s = { "<cmd>Telescope lsp_document_symbols<cr>", "Symbols (Document)" },
|
||||
S = { "<cmd>Telescope lsp_workspace_symbols<cr>", "Symbols (Workspace)" },
|
||||
},
|
||||
g = {
|
||||
c = { "<cmd>Telescope git_commits<cr>", "Commits" },
|
||||
s = { "<cmd>Telescope git_status<cr>", "Status" },
|
||||
},
|
||||
}, { prefix = "<leader>" })
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
require("telescope").load_extension("zoxide")
|
||||
require("which-key").register({
|
||||
f = {
|
||||
name = "find",
|
||||
z = { "<cmd>Telescope zoxide list<cr>", "find location" },
|
||||
},
|
||||
}, { prefix = "<leader>" })
|
||||
z = { "<cmd>Telescope zoxide list<cr>", "Find location (Zoxide)" },
|
||||
}, { prefix = "<leader>f" })
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
require("todo-comments").setup({})
|
||||
require("todo-comments").setup()
|
||||
|
|
|
|||
38
modules/programs/nvim/plugins/trouble-nvim.lua
Normal file
38
modules/programs/nvim/plugins/trouble-nvim.lua
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
require("trouble").setup()
|
||||
require("which-key").register({
|
||||
x = { "<cmd>TroubleToggle document_diagnostics<cr>", "Document Diagnostics (Trouble)" },
|
||||
X = { "<cmd>TroubleToggle workspace_diagnostics<cr>", "Workspace Diagnostics (Troule)" },
|
||||
l = { "<cmd>TroubleToggle loclist<cr>", "Location List (Trouble)" },
|
||||
q = { "<cmd>TroubleToggle quickfix<cr>", "Quickfix List (Trouble)" },
|
||||
t = { "<cmd>TodoTrouble<cr>", "Todo (Trouble)" },
|
||||
T = { "<cmd>TodoTrouble keywords=TODO,FIX,FIXME<cr>", "Todo/Fix/Fixme (Trouble)" },
|
||||
}, { prefix = "<leader>x" })
|
||||
require("which-key").register({
|
||||
t = { "<cmd>TodoTelescope<cr>", "Todo" },
|
||||
}, { prefix = "<leader>s" })
|
||||
require("which-key").register({
|
||||
["["] = {
|
||||
q = {
|
||||
function()
|
||||
if require("trouble").is_open() then
|
||||
require("trouble").previous({ skip_groups = true, jump = true })
|
||||
else
|
||||
vim.cmd.cprev()
|
||||
end
|
||||
end,
|
||||
"Previous trouble/quickfix item",
|
||||
},
|
||||
},
|
||||
["]"] = {
|
||||
q = {
|
||||
function()
|
||||
if require("trouble").is_open() then
|
||||
require("trouble").next({ skip_groups = true, jump = true })
|
||||
else
|
||||
vim.cmd.cnext()
|
||||
end
|
||||
end,
|
||||
"Next trouble/quickfix item",
|
||||
},
|
||||
},
|
||||
})
|
||||
3
modules/programs/nvim/plugins/twilight-nvim.lua
Normal file
3
modules/programs/nvim/plugins/twilight-nvim.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
require("twilight").setup({
|
||||
context = 20,
|
||||
})
|
||||
2
modules/programs/nvim/plugins/vim-startuptime.lua
Normal file
2
modules/programs/nvim/plugins/vim-startuptime.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
vim.g.startuptime_tries = 10
|
||||
vim.g.startuptime_exe_path = "vim"
|
||||
4
modules/programs/nvim/plugins/zen-mode-nvim.lua
Normal file
4
modules/programs/nvim/plugins/zen-mode-nvim.lua
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
require("zen-mode").setup()
|
||||
require("which-key").register({
|
||||
z = { "<cmd>ZenMode<cr>", "Zen mode" },
|
||||
}, { prefix = "<leader>t" })
|
||||
Loading…
Add table
Add a link
Reference in a new issue