Compare commits

...

13 Commits

54 changed files with 807 additions and 809 deletions

View File

@@ -34,4 +34,3 @@ git submodule add --name tmux/tmux-yank \
-f https://github.com/tmux-plugins/tmux-yank.git config/tmux/plugins/tmux-yank -f https://github.com/tmux-plugins/tmux-yank.git config/tmux/plugins/tmux-yank
git submodule add --name tmux/vim-tmux-navigator \ git submodule add --name tmux/vim-tmux-navigator \
-f https://github.com/christoomey/vim-tmux-navigator.git config/tmux/plugins/vim-tmux-navigator -f https://github.com/christoomey/vim-tmux-navigator.git config/tmux/plugins/vim-tmux-navigator

View File

@@ -7,12 +7,13 @@ export DOTFILES="$HOME/.dotfiles"
# Run x-load-configs in your terminal to reload the files. # Run x-load-configs in your terminal to reload the files.
function x-load-configs() function x-load-configs()
{ {
HOST="$(hostname -s)"
# Load the shell dotfiles, and then some: # Load the shell dotfiles, and then some:
for file in $DOTFILES/config/{exports,alias,functions}; do for file in $DOTFILES/config/{exports,alias,functions}; do
[ -r "$file" ] && source "$file" [ -r "$file" ] && source "$file"
[ -r "$file-secret" ] && source "$file-secret" [ -r "$file-secret" ] && source "$file-secret"
[ -r "$file-$HOSTNAME" ] && source "$file-$HOSTNAME" [ -r "$file-$HOST" ] && source "$file-$HOST"
[ -r "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret" [ -r "$file-$HOST-secret" ] && source "$file-$HOST-secret"
done done
} }
x-load-configs x-load-configs

4
config/alias-tunkki Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Setting aliases for tunkki
alias nvim="/snap/nvim/current/usr/bin/nvim"

View File

@@ -24,6 +24,8 @@ have ansible && {
export ANDROID_HOME="$XDG_DATA_HOME/android" export ANDROID_HOME="$XDG_DATA_HOME/android"
export HOMEBREW_NO_ENV_HINTS=true
# composer, https://getcomposer.org/ # composer, https://getcomposer.org/
export COMPOSER_HOME="$XDG_STATE_HOME/composer" export COMPOSER_HOME="$XDG_STATE_HOME/composer"
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin" export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"

View File

@@ -18,6 +18,8 @@ tap "xwmx/taps"
brew "act" brew "act"
# Mozilla CA certificate store # Mozilla CA certificate store
brew "ca-certificates" brew "ca-certificates"
# Cryptography and SSL/TLS Toolkit
brew "openssl@3"
# Interpreted, interactive, object-oriented programming language # Interpreted, interactive, object-oriented programming language
brew "python@3.11" brew "python@3.11"
# YAML Parser # YAML Parser
@@ -100,8 +102,6 @@ brew "dnsmasq"
brew "dog" brew "dog"
# Lightning-fast linter for .env files written in Rust # Lightning-fast linter for .env files written in Rust
brew "dotenv-linter" brew "dotenv-linter"
# Tool to verify that your files are in harmony with your .editorconfig
brew "editorconfig-checker"
# Useful examples at the command-line # Useful examples at the command-line
brew "eg-examples" brew "eg-examples"
# Run arbitrary commands when files change # Run arbitrary commands when files change
@@ -411,6 +411,7 @@ mas "Actions", id: 1586435171
mas "Audiobook Builder", id: 1437681957 mas "Audiobook Builder", id: 1437681957
mas "Ivory", id: 6444602274 mas "Ivory", id: 6444602274
mas "Keynote", id: 409183694 mas "Keynote", id: 409183694
mas "LastPass", id: 926036361
mas "Numbers", id: 409203825 mas "Numbers", id: 409203825
mas "Pages", id: 409201541 mas "Pages", id: 409201541
mas "Tailscale", id: 1475387142 mas "Tailscale", id: 1475387142

View File

@@ -1,6 +1 @@
tags
test.sh
.luarc.json
nvim
lazy-lock.json
session.vim session.vim

View File

@@ -1,3 +1,4 @@
-- luacheck: globals vim
local key = vim.api.nvim_set_keymap local key = vim.api.nvim_set_keymap
local remap = { noremap = true, silent = true } local remap = { noremap = true, silent = true }

View File

@@ -0,0 +1,68 @@
{
"LuaSnip": { "branch": "master", "commit": "ea7d7ea510c641c4f15042becd27f35b3e5b3c2b" },
"barbecue.nvim": { "branch": "main", "commit": "cd7e7da622d68136e13721865b4d919efd6325ed" },
"bufdelete.nvim": { "branch": "master", "commit": "07d1f8ba79dec59d42b975a4df1c732b2e4e37b4" },
"catppuccin": { "branch": "main", "commit": "2e3e5ebcdc24ef0d5b14a0a999dbbe7936512c46" },
"close-buffers.nvim": { "branch": "master", "commit": "3acbcad1211572342632a6c0151f839e7dead27f" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-calc": { "branch": "main", "commit": "ce91d14d2e7a8b3f6ad86d85e34d41c1ae6268d9" },
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
"cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" },
"cmp-look": { "branch": "master", "commit": "b39c50bcdf6199dddda56adc466c2bd9c951a960" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
"comment-box.nvim": { "branch": "main", "commit": "dd1a48f8d06102e9b87ae1e0069bc365c006979b" },
"dressing.nvim": { "branch": "master", "commit": "c7b035de7f91bb6b62b4308f105c56d1a968b8c5" },
"fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" },
"friendly-snippets": { "branch": "main", "commit": "00e191fea2cfbbdd378243f35b5953296537a116" },
"gitsigns.nvim": { "branch": "main", "commit": "d927caa075df63bf301d92f874efb72fd22fd3b4" },
"harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" },
"lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" },
"lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "dfdd771b792fbb4bad8e057d72558255695aa1a7" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "6148b51db945b55b3b725da39eaea6441e59dff8" },
"mason.nvim": { "branch": "main", "commit": "0942198fb9a998b6ccee36fb8dd7495eb8ba659c" },
"mini.nvim": { "branch": "main", "commit": "296ebbbd3e5ba5e43f5125efe18ad76fe3b632cc" },
"neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" },
"neodev.nvim": { "branch": "main", "commit": "183f5a7357397260b631d6cccceccc3621b50f78" },
"neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" },
"nui.nvim": { "branch": "main", "commit": "aa1b4c1e05983ff7debd2b4b2788651db099de2f" },
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
"nvim-dap": { "branch": "master", "commit": "31e1ece773e10448dcb616d5144290946a6264b7" },
"nvim-dap-go": { "branch": "main", "commit": "1b508e9db330108d3b5d62a6d9cc01fe6bbdd4e0" },
"nvim-dap-ui": { "branch": "master", "commit": "85b16ac2309d85c88577cd8ee1733ce52be8227e" },
"nvim-lspconfig": { "branch": "master", "commit": "a27356f1ef9c11e1f459cc96a3fcac5c265e72d6" },
"nvim-navic": { "branch": "master", "commit": "9c89730da6a05acfeb6a197e212dfadf5aa60ca0" },
"nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" },
"nvim-regexplainer": { "branch": "main", "commit": "4250c8f3c1307876384e70eeedde5149249e154f" },
"nvim-surround": { "branch": "main", "commit": "0d6882635817a2677749a330127d12ac30a4f3c8" },
"nvim-treesitter": { "branch": "master", "commit": "17b943e7c5cc2b2db3ac7b5720fbd42e75a00d8d" },
"nvim-treesitter-context": { "branch": "master", "commit": "31692b26d76ff1f7c6e0ab51814dd55e7417e96c" },
"nvim-web-devicons": { "branch": "master", "commit": "cfc8824cc1db316a276b36517f093baccb8e799a" },
"nvim-window-picker": { "branch": "main", "commit": "1b1bb834b0acb9eebb11a61664efc665757f1ba2" },
"plenary.nvim": { "branch": "master", "commit": "0dbe561ae023f02c2fb772b879e905055b939ce3" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"refactoring.nvim": { "branch": "master", "commit": "2ec9bc0fb5f3c8c6a0f776f0159dd2a3b1663554" },
"restoreview": { "branch": "main", "commit": "03d00d59a9ba640db6b44192ed0fcc9d7261dcd2" },
"schemastore.nvim": { "branch": "main", "commit": "a6759df4dcfc052246ee7a6cccfdb37d2180d617" },
"smartcolumn.nvim": { "branch": "main", "commit": "4aa00ad766f3c0f0e2561e0eb42df3ea3743c135" },
"stickybuf.nvim": { "branch": "master", "commit": "4c667bc837e5e3fec5a8857ee99f1a229fc76df9" },
"symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" },
"tabnine": { "branch": "master", "commit": "dcca6d2f9e8bbcde36aab87b9b87890810e4056d" },
"telescope-file-browser.nvim": { "branch": "master", "commit": "ad7b637c72549713b9aaed7c4f9c79c62bcbdff0" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" },
"telescope.nvim": { "branch": "master", "commit": "2c1ed33a6f6f2db3b69f5421f6b405eda1b07748" },
"trouble.nvim": { "branch": "main", "commit": "3f85d8ed30e97ceeddbbcf80224245d347053711" },
"twilight.nvim": { "branch": "main", "commit": "a4843e6e67092a1e6fa9666f02bf0ab59174c1df" },
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
"vim-vsnip": { "branch": "master", "commit": "7753ba9c10429c29d25abfd11b4c60b76718c438" },
"vim-vsnip-integ": { "branch": "master", "commit": "1914e72cf3de70df7f5dde476cd299aba2440aef" },
"vim-wakatime": { "branch": "master", "commit": "0d2efa2daff34b27b0d227d4c3b136811c93db93" },
"which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" },
"wilder.nvim": { "branch": "master", "commit": "679f348dc90d80ff9ba0e7c470c40a4d038dcecf" }
}

View File

@@ -45,6 +45,18 @@ wk.register({
"Delete hidden buffers", "Delete hidden buffers",
}, },
}, },
g = {
name = "[g]oto buffer",
["1"] = { "<cmd>buffer! 1<cr>", "Buffer 1" },
["2"] = { "<cmd>buffer! 2<cr>", "Buffer 2" },
["3"] = { "<cmd>buffer! 3<cr>", "Buffer 3" },
["4"] = { "<cmd>buffer! 4<cr>", "Buffer 4" },
["5"] = { "<cmd>buffer! 5<cr>", "Buffer 5" },
["6"] = { "<cmd>buffer! 6<cr>", "Buffer 6" },
["7"] = { "<cmd>buffer! 7<cr>", "Buffer 7" },
["8"] = { "<cmd>buffer! 8<cr>", "Buffer 8" },
["9"] = { "<cmd>buffer! 9<cr>", "Buffer 9" },
},
}, },
D = { D = {
name = "[D]iagnostics (Trouble)", name = "[D]iagnostics (Trouble)",
@@ -54,6 +66,10 @@ wk.register({
n = { ":lua vim.diagnostic.goto_next()<CR>", "[D]iagnostics: [n]ext" }, n = { ":lua vim.diagnostic.goto_next()<CR>", "[D]iagnostics: [n]ext" },
p = { ":lua vim.diagnostic.goto_prev()<CR>", "[D]iagnostics: [p]rev" }, p = { ":lua vim.diagnostic.goto_prev()<CR>", "[D]iagnostics: [p]rev" },
}, },
e = {
function() vim.cmd("Neotree focus source=filesystem position=left") end,
"Toggle the sidebar tree of the root folder.",
},
f = { f = {
name = "[f]ind", name = "[f]ind",
-- Find recursively files across the root folder subfiles. -- Find recursively files across the root folder subfiles.
@@ -61,6 +77,13 @@ wk.register({
-- Find recursively a text across the root folder subfiles. -- Find recursively a text across the root folder subfiles.
g = { ':lua require("telescope.builtin").live_grep()<cr>', "[f]ind text with [g]rep" }, g = { ':lua require("telescope.builtin").live_grep()<cr>', "[f]ind text with [g]rep" },
}, },
G = {
-- defined in plugins/gitsigns.lua
name = "Git",
b = {
name = "blame",
},
},
h = { h = {
name = "[h]arpoon", name = "[h]arpoon",
a = { "<cmd>lua require('harpoon.mark').add_file()<cr>", "[h]arpoon: [A]dd file" }, a = { "<cmd>lua require('harpoon.mark').add_file()<cr>", "[h]arpoon: [A]dd file" },
@@ -74,7 +97,7 @@ wk.register({
}, },
--- Remap debugging to "H" from LV default of "h" --- Remap debugging to "H" from LV default of "h"
H = { H = {
name = "[H]elp/Conceal/Telescope", name = "[H]elp/Conceal/Treesitter",
c = { c = {
name = "[c]onceal", name = "[c]onceal",
h = { ":set conceallevel=1<cr>", "hide/conceal" }, h = { ":set conceallevel=1<cr>", "hide/conceal" },
@@ -100,6 +123,10 @@ wk.register({
q = { ":qa<cr>", "[q]uit: [q]uit all" }, q = { ":qa<cr>", "[q]uit: [q]uit all" },
f = { ":qa!<cr>", "[q]uit: all with [f]orce" }, f = { ":qa!<cr>", "[q]uit: all with [f]orce" },
}, },
r = {
-- defined in plugins/refactoring-nvim.lua
name = "[r]efactor",
},
t = { t = {
name = "[t]elescope", name = "[t]elescope",
-- Find recursively TODOs, NOTEs, FIXITs, ... across the root folder subfiles. -- Find recursively TODOs, NOTEs, FIXITs, ... across the root folder subfiles.
@@ -108,29 +135,42 @@ wk.register({
x = { ":Bdelete<CR>", "[x]: Close current buffer" }, x = { ":Bdelete<CR>", "[x]: Close current buffer" },
}, { prefix = "<leader>" }) }, { prefix = "<leader>" })
-- Normal mode, prefix <leader> -- ╭──────────────────────────────────────────────────────────╮
-- │ Normal mode, prefix <leader> │
-- ╰──────────────────────────────────────────────────────────╯
wk.register({ wk.register({
b = { name = "Buffer" }, b = { name = "Buffer" },
}, { mode = "n", prefix = "<leader>" }) }, { mode = "n", prefix = "<leader>" })
-- Insert mode, prefix <leader> -- ╭──────────────────────────────────────────────────────────╮
-- │ Insert mode, prefix <leader> │
-- ╰──────────────────────────────────────────────────────────╯
wk.register({ wk.register({
b = { name = "Buffer" }, b = { name = "Buffer" },
}, { mode = "i", prefix = "<leader>" }) }, { mode = "i", prefix = "<leader>" })
-- ╭──────────────────────────────────────────────────────────╮
-- │ Insert mode, no prefix │
-- ╰──────────────────────────────────────────────────────────╯
wk.register({
["<C-s>"] = { "<cmd>w<cr>", "Save file" },
["<C-Home>"] = { "<Home>", "Do just Home on CTRL + Home" },
}, { mode = "i", prefix = "" })
-- ╭──────────────────────────────────────────────────────────╮
-- │ All modes, no prefix │
-- ╰──────────────────────────────────────────────────────────╯
wk.register({
["<C-s>"] = { "<cmd>w<cr>", "Save file" },
["<C-End>"] = { "<End>", "Do just End on CTRL + End" },
}, { prefix = "" })
-- Go to the next block. -- Go to the next block.
--key('n', '<C-Down>', 'g%', remap ) --key('n', '<C-Down>', 'g%', remap )
-- Loop through brackets blocks. -- Loop through brackets blocks.
--key('n', '<C-Up>', 'z%', remap ) --key('n', '<C-Up>', 'z%', remap )
-- Do just End on CTRL + End.
key("i", "<C-End>", "<End>", remap)
key("n", "<C-End>", "<End>", remap)
-- Do just Home on CTRL + Home.
key("i", "<C-Home>", "<End>", remap)
-- Highlight the word after pressing enter. -- Highlight the word after pressing enter.
key( key(
"n", "n",
@@ -150,14 +190,6 @@ key(
-- Toggle highlight of search -- Toggle highlight of search
key("n", "<C-c>", ":set hlsearch!<CR>", remap) key("n", "<C-c>", ":set hlsearch!<CR>", remap)
-- Toggle the sidebar tree of the root folder.
key("n", "<leader>e", "", {
noremap = true,
silent = true,
desc = "Open NeoTree without warnings",
callback = function() vim.cmd("Neotree toggle source=filesystem position=left") end,
})
-- Try to correct the current word. -- Try to correct the current word.
key("i", "<C-b>", "ea<C-x><C-s>", remap) key("i", "<C-b>", "ea<C-x><C-s>", remap)
@@ -181,9 +213,6 @@ key("v", "<C-x>", "mad`ai<Right>", { silent = true })
key("v", "<C-c>", "may`ai", remap) key("v", "<C-c>", "may`ai", remap)
key("i", "<C-v>", "<Esc>:Registers<CR>", remap) key("i", "<C-v>", "<Esc>:Registers<CR>", remap)
-- Set 'CTRL + s as save'
key("n", "<C-s>", "<cmd>w<cr>", remap)
-- Create mark. -- Create mark.
key("n", "'", "`", remap) key("n", "'", "`", remap)
@@ -227,53 +256,3 @@ key("v", ">", ">gv", remap)
-- Set 'Backspace' as 'delete selection' for the visual selection. -- Set 'Backspace' as 'delete selection' for the visual selection.
key("v", "<BS>", '"_di', remap) key("v", "<BS>", '"_di', remap)
---
-- Barbar keymappings
local map = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true }
-- Move to previous/next
map("n", "<C-,>", "<Cmd>BufferPrevious<CR>", opts)
map("n", "<C-.>", "<Cmd>BufferNext<CR>", opts)
-- Re-order to previous/next
map("n", "<C-<>", "<Cmd>BufferMovePrevious<CR>", opts)
map("n", "<C->>", "<Cmd>BufferMoveNext<CR>", opts)
-- Goto buffer in position...
map("n", "<C-1>", "<Cmd>BufferGoto 1<CR>", opts)
map("n", "<C-2>", "<Cmd>BufferGoto 2<CR>", opts)
map("n", "<C-3>", "<Cmd>BufferGoto 3<CR>", opts)
map("n", "<C-4>", "<Cmd>BufferGoto 4<CR>", opts)
map("n", "<C-5>", "<Cmd>BufferGoto 5<CR>", opts)
map("n", "<C-6>", "<Cmd>BufferGoto 6<CR>", opts)
map("n", "<C-7>", "<Cmd>BufferGoto 7<CR>", opts)
map("n", "<C-8>", "<Cmd>BufferGoto 8<CR>", opts)
map("n", "<C-9>", "<Cmd>BufferGoto 9<CR>", opts)
map("n", "<C-0>", "<Cmd>BufferLast<CR>", opts)
-- Pin/unpin buffer
map("n", "<C-p>", "<Cmd>BufferPin<CR>", opts)
-- Close buffer
-- map('n', '<C-c>', '<Cmd>BufferClose<CR>', opts)
-- Wipeout buffer
-- :BufferWipeout
-- Close commands
-- :BufferCloseAllButCurrent
-- :BufferCloseAllButPinned
-- :BufferCloseAllButCurrentOrPinned
-- :BufferCloseBuffersLeft
-- :BufferCloseBuffersRight
-- Magic buffer-picking mode
map("n", "<C-p>", "<Cmd>BufferPick<CR>", opts)
-- Sort automatically by...
map("n", "<Space>bb", "<Cmd>BufferOrderByBufferNumber<CR>", opts)
map("n", "<Space>bd", "<Cmd>BufferOrderByDirectory<CR>", opts)
map("n", "<Space>bl", "<Cmd>BufferOrderByLanguage<CR>", opts)
map("n", "<Space>bw", "<Cmd>BufferOrderByWindowNumber<CR>", opts)
-- Other:
-- :BarbarEnable - enables barbar (enabled by default)
-- :BarbarDisable - very bad command, should never be used

View File

@@ -1,4 +1,5 @@
-- Completion for snippets. -- Completion for snippets.
-- luacheck: globals vim CAPABILITIES
CAPABILITIES = vim.lsp.protocol.make_client_capabilities() CAPABILITIES = vim.lsp.protocol.make_client_capabilities()
CAPABILITIES = require("cmp_nvim_lsp").default_capabilities(CAPABILITIES) CAPABILITIES = require("cmp_nvim_lsp").default_capabilities(CAPABILITIES)
CAPABILITIES.textDocument.completion.completionItem.snippetSupport = true CAPABILITIES.textDocument.completion.completionItem.snippetSupport = true

View File

@@ -1,5 +1,4 @@
local option = vim.api.nvim_set_option -- luacheck: globals vim
local set = vim.api.nvim_set_var
-- Fix moving through lines 'gk' and 'gj' -- Fix moving through lines 'gk' and 'gj'
vim.wo.linebreak = true vim.wo.linebreak = true
@@ -103,7 +102,7 @@ vim.o.spelllang = "en_gb"
vim.bo.spelllang = "en_gb" vim.bo.spelllang = "en_gb"
-- Global statusline. -- Global statusline.
vim.opt.laststatus = 3 vim.opt.laststatus = 2
-- When "on" the commands listed below move the cursor to the first non-blank -- When "on" the commands listed below move the cursor to the first non-blank
-- of the line. When off the cursor is kept in the same column (if possible). -- of the line. When off the cursor is kept in the same column (if possible).
@@ -123,31 +122,37 @@ vim.o.shortmess = vim.o.shortmess .. "c"
-- Menu Transparency. -- Menu Transparency.
vim.go.pumblend = 10 vim.go.pumblend = 10
--------------------Variables----------------- -- ╭──────────────────────────────────────────────────────────╮
-- │ Variables │
-- ╰──────────────────────────────────────────────────────────╯
set("one_allow_itali:set cursorlinec:set cursorlines", 1) vim.api.nvim_set_var("one_allow_itali:set cursorlinec:set cursorlines", 1)
set("do_filetype_lua", 1) vim.api.nvim_set_var("do_filetype_lua", 1)
set("MRU_File", "~/.cache/vim_mru_files") vim.api.nvim_set_var("MRU_File", "~/.cache/vim_mru_files")
--------------------API------------------------ -- ╭──────────────────────────────────────────────────────────╮
-- │ API │
-- ╰──────────────────────────────────────────────────────────╯
-- Change title accordingly. -- Change title accordingly.
-- option('title', true) vim.api.nvim_set_option("title", true)
-- Set clipboard to be global across the system -- Set clipboard to be global across the system
option("clipboard", "unnamedplus") vim.api.nvim_set_option("clipboard", "unnamedplus")
-- Basic fold column -- Basic fold column
option("foldcolumn", "1") vim.api.nvim_set_option("foldcolumn", "1")
-- Set dictionary to language spell -- Set dictionary to language spell
option("dictionary", "/usr/share/dict/words") vim.api.nvim_set_option("dictionary", "/usr/share/dict/words")
-- Wildignore for when opening files :0 -- Wildignore for when opening files :0
option("wildignore", "*/tmp*/,*/node_modules/*,_site,*/__pycache__/,*/venv/*,*/target/*,*/.vim$,~$,*/.log") vim.api.nvim_set_option(
"wildignore",
"*/tmp*/,*/node_modules/*,_site,*/__pycache__/,*/venv/*,*/target/*,*/.vim$,~$,*/.log"
)
-- Folding -- Folding
option("foldmethod", "syntax") vim.api.nvim_set_option("foldmethod", "syntax")
vim.api.nvim_set_option('foldenable', false)
-- File format for neovim reading vim.api.nvim_set_option('foldminlines', 5)
option("fileformat", "unix")

View File

@@ -1 +0,0 @@
return { "kazhala/close-buffers.nvim" }

View File

@@ -1,4 +0,0 @@
return {
"LudoPinelli/comment-box.nvim",
opts = {},
}

View File

@@ -1,29 +0,0 @@
return {
"anuvyklack/fold-preview.nvim",
dependencies = { "anuvyklack/keymap-amend.nvim", "ray-x/lsp_signature.nvim" },
config = function()
local fp = require("fold-preview")
local map = require("fold-preview").mapping
local keymap = vim.keymap
keymap.amend = require("keymap-amend")
fp.setup({
default_keybindings = false,
-- another settings
})
keymap.amend("n", "K", function(original)
if not fp.show_preview() then original() end
-- or
-- if not fp.toggle_preview() then original() end
-- to close preview on second press on K.
end)
keymap.amend("n", "h", map.close_preview_open_fold)
keymap.amend("n", "l", map.close_preview_open_fold)
keymap.amend("n", "zo", map.close_preview)
keymap.amend("n", "zO", map.close_preview)
keymap.amend("n", "zc", map.close_preview_without_defer)
keymap.amend("n", "zR", map.close_preview)
keymap.amend("n", "zM", map.close_preview_without_defer)
end,
}

View File

@@ -37,19 +37,19 @@ return {
end, { expr = true }) end, { expr = true })
-- Actions -- Actions
map("n", "<leader>hs", gs.stage_hunk, { desc = "Stage Hunk" }) map("n", "<leader>Ghs", gs.stage_hunk, { desc = "Stage Hunk" })
map("n", "<leader>hr", gs.reset_hunk, { desc = "Reset Hunk" }) map("n", "<leader>Ghr", gs.reset_hunk, { desc = "Reset Hunk" })
map("v", "<leader>hs", function() gs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) end) map("v", "<leader>Ghs", function() gs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) end)
map("v", "<leader>hr", function() gs.reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) end) map("v", "<leader>Ghr", function() gs.reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) end)
map("n", "<leader>hS", gs.stage_buffer, { desc = "Stage Buffer" }) map("n", "<leader>GhS", gs.stage_buffer, { desc = "Stage Buffer" })
map("n", "<leader>hu", gs.undo_stage_hunk, { desc = "Undo Stage Hunk" }) map("n", "<leader>Ghu", gs.undo_stage_hunk, { desc = "Undo Stage Hunk" })
map("n", "<leader>hR", gs.reset_buffer, { desc = "Reset Buffer" }) map("n", "<leader>GhR", gs.reset_buffer, { desc = "Reset Buffer" })
map("n", "<leader>hp", gs.preview_hunk, { desc = "Preview Hunk" }) map("n", "<leader>Ghp", gs.preview_hunk, { desc = "Preview Hunk" })
map("n", "<leader>hb", function() gs.blame_line({ full = true }) end, { desc = "Blame Line" }) map("n", "<leader>Gbl", function() gs.blame_line({ full = true }) end, { desc = "Blame Line" })
map("n", "<leader>tb", gs.toggle_current_line_blame, { desc = "Toggle Current Line Blame" }) map("n", "<leader>Gbt", gs.toggle_current_line_blame, { desc = "Toggle Current Line Blame" })
map("n", "<leader>hd", gs.diffthis, { desc = "Diff This" }) map("n", "<leader>Ghd", gs.diffthis, { desc = "Diff This" })
map("n", "<leader>hD", function() gs.diffthis("~") end) map("n", "<leader>GhD", function() gs.diffthis("~") end)
map("n", "<leader>td", gs.toggle_deleted, { desc = "Toggle Deleted" }) map("n", "<leader>Gtd", gs.toggle_deleted, { desc = "Toggle Deleted" })
-- Text object -- Text object
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>") map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>")

View File

@@ -1 +0,0 @@
return { "ThePrimeagen/harpoon" }

View File

@@ -1,70 +0,0 @@
-- Floating statuslines for Neovim
-- https://github.com/b0o/incline.nvim
--
-- Lightweight floating statuslines, best used with
-- Neovim's global statusline (set laststatus=3).
return {
"b0o/incline.nvim",
config = {
debounce_threshold = {
falling = 50,
rising = 0,
},
hide = {
cursorline = true,
focused_win = false,
only_win = true,
},
highlight = {
groups = {
InclineNormal = {
default = true,
group = "NormalFloat",
},
InclineNormalNC = {
default = true,
group = "NormalFloat",
},
},
},
ignore = {
buftypes = "special",
filetypes = {},
floating_wins = true,
unlisted_buffers = true,
wintypes = "special",
},
render = "basic",
window = {
margin = {
horizontal = 1,
vertical = 1,
},
options = {
signcolumn = "no",
wrap = false,
},
padding = 1,
padding_char = " ",
placement = {
horizontal = "right",
vertical = "top",
},
width = "fit",
winhighlight = {
active = {
EndOfBuffer = "None",
Normal = "InclineNormal",
Search = "None",
},
inactive = {
EndOfBuffer = "None",
Normal = "InclineNormalNC",
Search = "None",
},
},
zindex = 10,
},
},
}

View File

@@ -1,28 +1,24 @@
-- luacheck: globals vim
return { return {
-- -- plenary: full; complete; entire; absolute; unqualified.
-- Menu -- All the lua functions I don't want to write twice.
-- -- https://github.com/nvim-lua/plenary.nvim
-- Icons on menu { "nvim-lua/plenary.nvim", lazy = true },
"onsails/lspkind-nvim",
-- Restore folds and cursor position -- lua `fork` of vim-web-devicons for neovim
"senderle/restoreview", -- https://github.com/nvim-tree/nvim-web-devicons
{ "kyazdani42/nvim-web-devicons" },
--
-- Appearance
--
-- The theme of choise, catppuccin -- The theme of choise, catppuccin
---- https://github.com/catppuccin/nvim -- https://github.com/catppuccin/nvim
{ {
"catppuccin/nvim", "catppuccin/nvim",
name = "catppuccin", name = "catppuccin",
priority = 10000, priority = 10000,
enabled = true, enabled = true,
lazy = false, lazy = false,
config = function() config = function() vim.cmd.colorscheme("catppuccin") end,
vim.cmd.colorscheme("catppuccin")
end,
opts = { opts = {
flavour = "mocha", flavour = "mocha",
transparent_background = true, transparent_background = true,
@@ -34,7 +30,8 @@ return {
integrations = { integrations = {
aerial = true, aerial = true,
barbecue = { barbecue = {
dim_dirname = true, -- directory name is dimmed by default -- directory name is dimmed by default
dim_dirname = true,
bold_basename = true, bold_basename = true,
dim_context = false, dim_context = false,
alt_background = false, alt_background = false,
@@ -50,7 +47,6 @@ return {
mason = true, mason = true,
neotree = true, neotree = true,
notify = true, notify = true,
nvimtree = false,
native_lsp = { native_lsp = {
enabled = true, enabled = true,
virtual_text = { virtual_text = {
@@ -73,9 +69,8 @@ return {
symbols_outline = true, symbols_outline = true,
telescope = { telescope = {
enabled = true, enabled = true,
style = "catppuccin" style = "catppuccin",
}, },
ts_rainbow = true,
treesitter = true, treesitter = true,
lsp_trouble = true, lsp_trouble = true,
which_key = true, which_key = true,
@@ -83,16 +78,173 @@ return {
}, },
}, },
"rcarriga/nvim-notify", -- Notifications as a popup
-- https://github.com/rcarriga/nvim-notify
{
"rcarriga/nvim-notify",
keys = {
{
"<leader>un",
function() require("notify").dismiss({ silent = true, pending = true }) end,
desc = "Dismiss all Notifications",
},
},
opts = {
timeout = 3000,
max_height = function() return math.floor(vim.o.lines * 0.75) end,
max_width = function() return math.floor(vim.o.columns * 0.75) end,
},
init = function() vim.notify = require("notify") end,
},
-- vscode-like pictograms for neovim lsp completion items
-- https://github.com/onsails/lspkind.nvim
{ "onsails/lspkind-nvim" },
-- Save and restore Vim views automatically
-- https://github.com/senderle/restoreview
{ "senderle/restoreview" },
-- Create key bindings that stick. WhichKey is a lua plugin for Neovim that
-- displays a popup with possible keybindings of the command you started typing.
-- https://github.com/folke/which-key.nvim
{
"folke/which-key.nvim",
enabled = true,
lazy = false,
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
end,
opts = {
plugins = { spelling = true, marks = true, registers = true },
},
},
-- Neovim plugin to improve the default vim.ui interfaces
-- https://github.com/stevearc/dressing.nvim
{
"stevearc/dressing.nvim",
lazy = true,
init = function()
---@diagnostic disable-next-line: duplicate-set-field
vim.ui.select = function(...)
require("lazy").load({ plugins = { "dressing.nvim" } })
return vim.ui.select(...)
end
---@diagnostic disable-next-line: duplicate-set-field
vim.ui.input = function(...)
require("lazy").load({ plugins = { "dressing.nvim" } })
return vim.ui.input(...)
end
end,
},
-- Add/change/delete surrounding delimiter pairs with ease.
-- https://github.com/kylechui/nvim-surround
{
--[[
Old text Command New text
------------------------------------------------------------------
surround_words ysiw) (surround_words)
make strings ys$" "make strings"
[delete ar*ound me!] ds] delete around me!
"change quot*es" cs'" "change quotes"
<b>or tag* types</b> csth1<CR> <h1>or tag types</h1>
delete(functi*on calls) dsf function calls
]]
"kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use `main` branch for the latest features
event = "VeryLazy",
config = function()
require("nvim-surround").setup()
end,
},
-- A tree like view for symbols in Neovim using the LSP.
-- https://github.com/simrat39/symbols-outline.nvim
{
"simrat39/symbols-outline.nvim",
cmd = "SymbolsOutline",
keys = { { "<leader>bs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
opts = {
-- add your options that should be passed to the setup() function here
position = "right",
},
},
-- Getting you where you want with the fewest keystrokes.
-- https://github.com/ThePrimeagen/harpoon
{ "ThePrimeagen/harpoon" },
-- A Neovim plugin hiding your colorcolumn when unneeded.
-- https://github.com/m4xshen/smartcolumn.nvim
{
"m4xshen/smartcolumn.nvim",
opts = {
colorcolumn = { "80", "100", "120" },
disabled_filetypes = { "help", "text", "markdown", "json", "lazy", "starter", "neo-tree" },
},
},
-- Status information for LSP. -- Status information for LSP.
"j-hui/fidget.nvim", -- https://github.com/j-hui/fidget.nvim
{ "j-hui/fidget.nvim" },
-- Close buffer without messing up with the window. -- Close buffer without messing up with the window.
"famiu/bufdelete.nvim", -- https://github.com/famiu/bufdelete.nvim
{ "famiu/bufdelete.nvim" },
"nyoom-engineering/oxocarbon.nvim", -- Delete multiple vim buffers based on different conditions
-- https://github.com/kazhala/close-buffers.nvim
{ "kazhala/close-buffers.nvim" },
-- JSONLS -- JSONLS
"b0o/schemastore.nvim", -- https://github.com/b0o/schemastore.nvim
{ "b0o/schemastore.nvim" },
-- sleuth.vim: Heuristically set buffer options
-- https://github.com/tpope/vim-sleuth
{ "tpope/vim-sleuth" },
-- Neovim plugin for locking a buffer to a window
-- https://github.com/stevearc/stickybuf.nvim
{ "stevearc/stickybuf.nvim", opts = {} },
-- Describe the regexp under the cursor
-- https://github.com/bennypowers/nvim-regexplainer
{
"bennypowers/nvim-regexplainer",
requires = {
"nvim-treesitter/nvim-treesitter",
"MunifTanjim/nui.nvim",
},
opts = {
-- automatically show the explainer when the cursor enters a regexp
auto = true,
},
},
-- Clarify and beautify your comments using boxes and lines.
-- https://github.com/LudoPinelli/comment-box.nvim
{ "LudoPinelli/comment-box.nvim", opts = {} },
-- Tabnine Client for Neovim
-- https://github.com/codota/tabnine-nvim
{
"codota/tabnine-nvim",
name = "tabnine",
build = vim.loop.os_uname().sysname == "Windows_NT" and "pwsh.exe -file .\\dl_binaries.ps1" or "./dl_binaries.sh",
cmd = { "TabnineStatus", "TabnineDisable", "TabnineEnable", "TabnineToggle" },
event = "User",
opts = { accept_keymap = "<C-e>" },
},
-- Vim plugin for automatic time tracking and metrics generated from your programming activity.
-- https://github.com/wakatime/vim-wakatime
{
"wakatime/vim-wakatime",
lazy = false,
enabled = true,
},
} }

View File

@@ -1,9 +0,0 @@
return {
"mrjones2014/legendary.nvim",
-- since legendary.nvim handles all your keymaps/commands,
-- its recommended to load legendary.nvim before other plugins
priority = 10000,
lazy = false,
-- sqlite is only needed if you want to use frecency sorting
-- dependencies = { 'kkharji/sqlite.lua' }
}

View File

@@ -1,36 +0,0 @@
-- Signs for built-in marks.
return {
"chentoast/marks.nvim",
config = {
-- whether to map keybinds or not. default true
default_mappings = true,
-- which builtin marks to show. default {}
builtin_marks = { ".", "<", ">", "^" },
-- whether movements cycle back to the beginning/end of buffer. default true
cyclic = true,
-- whether the shada file is updated after modifying uppercase marks. default false
force_write_shada = false,
-- how often (in ms) to redraw signs/recompute mark positions.
-- higher values will have better performance but may cause visual lag,
-- while lower values may cause performance penalties. default 150.
refresh_interval = 250,
-- sign priorities for each type of mark - builtin marks, uppercase marks, lowercase
-- marks, and bookmarks.
-- can be either a table with all/none of the keys, or a single number, in which case
-- the priority applies to all marks.
-- default 10.
sign_priority = { lower = 10, upper = 15, builtin = 8, bookmark = 20 },
-- disables mark tracking for specific filetypes. default {}
excluded_filetypes = {},
-- marks.nvim allows you to configure up to 10 bookmark groups, each with its own
-- sign/virttext. Bookmarks can be used to group together positions and quickly move
-- across multiple buffers. default sign is '!@#$%^&*()' (from 0 to 9), and
-- default virt_text is "".
bookmark_0 = {
sign = "",
virt_text = "hello world",
},
mappings = {},
},
}

View File

@@ -1,4 +1,6 @@
-- File-tree manager. -- File-tree manager.
-- https://github.com/nvim-neo-tree/neo-tree.nvim
-- luacheck: globals vim
-- Unless you are still migrating, remove the deprecated commands from v1.x -- Unless you are still migrating, remove the deprecated commands from v1.x
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]]) vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
@@ -7,7 +9,7 @@ return {
"nvim-neo-tree/neo-tree.nvim", "nvim-neo-tree/neo-tree.nvim",
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
"kyazdani42/nvim-web-devicons", -- not strictly required, but recommended "kyazdani42/nvim-web-devicons",
"MunifTanjim/nui.nvim", "MunifTanjim/nui.nvim",
{ {
-- only needed if you want to use the commands with "_with_window_picker" suffix -- only needed if you want to use the commands with "_with_window_picker" suffix
@@ -39,13 +41,17 @@ return {
vim.fn.sign_define("DiagnosticSignHint", { text = "󰌵", texthl = "DiagnosticSignHint" }) vim.fn.sign_define("DiagnosticSignHint", { text = "󰌵", texthl = "DiagnosticSignHint" })
require("neo-tree").setup({ require("neo-tree").setup({
close_if_last_window = true, -- Close Neo-tree if it is the last window left in the tab -- Close Neo-tree if it is the last window left in the tab
popup_border_style = "rounded", -- "double", "none", "rounded", "shadow", "single" or "solid" close_if_last_window = true,
-- "double", "none", "rounded", "shadow", "single" or "solid"
popup_border_style = "rounded",
enable_git_status = true, enable_git_status = true,
enable_diagnostics = true, enable_diagnostics = true,
enable_normal_mode_for_inputs = false, -- Enable normal mode for input dialogs. -- Enable normal mode for input dialogs.
enable_normal_mode_for_inputs = false,
open_files_do_not_replace_types = { "terminal", "trouble", "qf" }, -- when opening files, do not use windows containing these filetypes or buftypes -- when opening files, do not use windows containing these filetypes or buftypes
open_files_do_not_replace_types = { "terminal", "trouble", "qf" },
-- popup_border_style is for input and confirmation dialogs. -- popup_border_style is for input and confirmation dialogs.
-- Configurtaion of floating window is done in the individual source sections. -- Configurtaion of floating window is done in the individual source sections.
@@ -53,13 +59,20 @@ return {
close_floats_on_escape_key = true, close_floats_on_escape_key = true,
default_source = "filesystem", default_source = "filesystem",
git_status_async = true, git_status_async = true,
log_level = "info", -- "trace", "debug", "info", "warn", "error", "fatal" -- "trace", "debug", "info", "warn", "error", "fatal"
log_to_file = false, -- true, false, "/path/to/file.log", use :NeoTreeLogs to show the file log_level = "info",
open_files_in_last_window = true, -- false = open files in top left window -- true, false, "/path/to/file.log", use :NeoTreeLogs to show the file
resize_timer_interval = 100, -- in ms, needed for containers to redraw right aligned and faded content log_to_file = false,
sort_case_insensitive = true, -- used when sorting files and directories in the tree -- false = open files in top left window
use_popups_for_input = false, -- If false, inputs will use vim.ui.input() instead of custom floats. open_files_in_last_window = true,
sort_function = nil, -- use a custom function for sorting files and directories in the tree -- in ms, needed for containers to redraw right aligned and faded content
resize_timer_interval = 100,
-- used when sorting files and directories in the tree
sort_case_insensitive = true,
-- If false, inputs will use vim.ui.input() instead of custom floats.
use_popups_for_input = false,
-- use a custom function for sorting files and directories in the tree
sort_function = nil,
event_handlers = { event_handlers = {
-- { -- {
@@ -121,14 +134,16 @@ return {
}, },
indent = { indent = {
indent_size = 2, indent_size = 2,
padding = 1, -- extra padding on left hand side -- extra padding on left hand side
padding = 1,
-- indent guides -- indent guides
with_markers = true, with_markers = true,
indent_marker = "", indent_marker = "",
last_indent_marker = "", last_indent_marker = "",
highlight = "NeoTreeIndentMarker", highlight = "NeoTreeIndentMarker",
-- expander config, needed for nesting files -- expander config, needed for nesting files
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders -- if nil and file nesting is enabled, will enable expanders
with_expanders = true,
expander_collapsed = "", expander_collapsed = "",
expander_expanded = "", expander_expanded = "",
expander_highlight = "NeoTreeExpander", expander_highlight = "NeoTreeExpander",
@@ -137,7 +152,8 @@ return {
folder_closed = "", folder_closed = "",
folder_open = "", folder_open = "",
folder_empty = "-", folder_empty = "-",
-- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there -- 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. -- then these will never be used.
default = "*", default = "*",
highlight = "NeoTreeFileIcon", highlight = "NeoTreeFileIcon",
@@ -154,10 +170,10 @@ return {
git_status = { git_status = {
symbols = { symbols = {
-- Change type -- Change type
added = "˖", -- or "✚", but this is redundant info if you use git_status_colors on the name added = "˖",
modified = "±", -- or "", but this is redundant info if you use git_status_colors on the name modified = "±",
deleted = "", -- this can only be used in the git_status source deleted = "",
renamed = "", -- this can only be used in the git_status source renamed = "",
-- Status type -- Status type
untracked = "?", untracked = "?",
ignored = "", ignored = "",
@@ -222,15 +238,20 @@ return {
-- that will be available in all sources (if not overridden in `opts[source_name].commands`) -- that will be available in all sources (if not overridden in `opts[source_name].commands`)
-- see `:h neo-tree-custom-commands-global` -- see `:h neo-tree-custom-commands-global`
commands = {}, commands = {},
window = { -- see https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup for window = {
-- see https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup for
-- possible options. These can also be functions that return these options. -- possible options. These can also be functions that return these options.
position = "left", -- left, right, float, current
width = 40, -- applies to left and right positions -- left, right, float, current
position = "left",
-- applies to left and right positions
width = 40,
mapping_options = { mapping_options = {
noremap = true, noremap = true,
nowait = true, nowait = true,
}, },
popup = { -- settings that apply to float position only -- settings that apply to float position only
popup = {
size = { size = {
height = "80%", height = "80%",
width = "50%", width = "50%",
@@ -244,11 +265,14 @@ return {
mappings = { mappings = {
["<space>"] = { ["<space>"] = {
"toggle_node", "toggle_node",
nowait = false, -- disable `nowait` if you have existing combos starting with this char that you want to use -- disable `nowait` if you have existing combos
-- starting with this char that you want to use
nowait = false,
}, },
["<2-LeftMouse>"] = "open", ["<2-LeftMouse>"] = "open",
["<cr>"] = "open", ["<cr>"] = "open",
["<esc>"] = "cancel", -- close preview or floating neo-tree window -- close preview or floating neo-tree window
["<esc>"] = "cancel",
["P"] = { "toggle_preview", config = { use_float = true } }, ["P"] = { "toggle_preview", config = { use_float = true } },
["l"] = "focus_preview", ["l"] = "focus_preview",
["S"] = "open_split", ["S"] = "open_split",
@@ -259,33 +283,41 @@ return {
-- ["<cr>"] = "open_drop", -- ["<cr>"] = "open_drop",
-- ["t"] = "open_tab_drop", -- ["t"] = "open_tab_drop",
["w"] = "open_with_window_picker", ["w"] = "open_with_window_picker",
--["P"] = "toggle_preview", -- enter preview mode, which shows the current node without focusing -- -- enter preview mode, which shows the current node without focusing
--["P"] = "toggle_preview",
["C"] = "close_node", ["C"] = "close_node",
-- ['C'] = 'close_all_subnodes', -- ['C'] = 'close_all_subnodes',
["z"] = "close_all_nodes", ["z"] = "close_all_nodes",
--["Z"] = "expand_all_nodes", --["Z"] = "expand_all_nodes",
["a"] = { ["a"] = {
"add", "add",
-- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). see `:h neo-tree-file-actions` for details -- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc).
-- some commands may take optional config options, see `:h neo-tree-mappings` for details -- see `:h neo-tree-file-actions` for details
-- some commands may take optional config options,
-- see `:h neo-tree-mappings` for details
config = { config = {
show_path = "none", -- "none", "relative", "absolute" -- "none", "relative", "absolute"
show_path = "relative",
}, },
}, },
["A"] = "add_directory", -- also accepts the optional config.show_path option like "add". this also supports BASH style brace expansion. -- also accepts the optional config.show_path option like "add".
-- this also supports BASH style brace expansion.
["A"] = "add_directory",
["d"] = "delete", ["d"] = "delete",
["r"] = "rename", ["r"] = "rename",
["y"] = "copy_to_clipboard", ["y"] = "copy_to_clipboard",
["x"] = "cut_to_clipboard", ["x"] = "cut_to_clipboard",
["p"] = "paste_from_clipboard", ["p"] = "paste_from_clipboard",
["c"] = "copy", -- takes text input for destination, also accepts the optional config.show_path option like "add": -- takes text input for destination, also accepts the optional config.show_path option like "add":
-- ["c"] = { -- ["c"] = {
-- "copy", -- "copy",
-- config = { -- config = {
-- show_path = "none" -- "none", "relative", "absolute" -- show_path = "none" -- "none", "relative", "absolute"
-- } -- }
--} --}
["m"] = "move", -- takes text input for destination, also accepts the optional config.show_path option like "add". ["c"] = "copy",
-- takes text input for destination, also accepts the optional config.show_path option like "add".
["m"] = "move",
["q"] = "close_window", ["q"] = "close_window",
["R"] = "refresh", ["R"] = "refresh",
["?"] = "show_help", ["?"] = "show_help",
@@ -295,9 +327,10 @@ return {
}, },
nesting_rules = {}, nesting_rules = {},
filesystem = { filesystem = {
commands = {}, -- Add a custom command or override a global one using the same function name -- Add a custom command or override a global one using the same function name
commands = {},
components = { components = {
harpoon_index = function(config, node, state) harpoon_index = function(config, node, _)
local Marked = require("harpoon.mark") local Marked = require("harpoon.mark")
local path = node:get_id() local path = node:get_id()
local succuss, index = pcall(Marked.get_index_of, path) local succuss, index = pcall(Marked.get_index_of, path)
@@ -312,10 +345,12 @@ return {
end, end,
}, },
filtered_items = { filtered_items = {
visible = false, -- when true, they will just be displayed differently than normal items -- when true, they will just be displayed differently than normal items
visible = false,
hide_dotfiles = false, hide_dotfiles = false,
hide_gitignored = false, hide_gitignored = false,
hide_hidden = true, -- only works on Windows for hidden files/directories -- only works on Windows for hidden files/directories
hide_hidden = true,
hide_by_name = { hide_by_name = {
".git", ".git",
".DS_Store", ".DS_Store",
@@ -324,7 +359,8 @@ return {
".mypy_cache", ".mypy_cache",
"node_modules", "node_modules",
}, },
hide_by_pattern = { -- uses glob style patterns -- uses glob style patterns
hide_by_pattern = {
--"*.meta", --"*.meta",
--"*/src/*/tsconfig.json", --"*/src/*/tsconfig.json",
"*-cache", "*-cache",
@@ -341,26 +377,34 @@ return {
}, },
}, },
find_by_full_path_words = true, find_by_full_path_words = true,
group_empty_dirs = false, -- when true, empty folders will be grouped together -- when true, empty folders will be grouped together
bind_to_cwd = false, -- true creates a 2-way binding between vim's cwd and neo-tree's root group_empty_dirs = false,
search_limit = 50, -- max number of search results when using filters -- true creates a 2-way binding between vim's cwd and neo-tree's root
bind_to_cwd = false,
-- max number of search results when using filters
search_limit = 50,
follow_current_file = { follow_current_file = {
enabled = false, -- This will find and focus the file in the active buffer every time -- This will find and focus the file in the active buffer every time
-- -- the current file is changed while the tree is open. -- the current file is changed while the tree is open.
leave_dirs_open = false, -- `false` closes auto expanded dirs, such as with `:Neotree reveal` enabled = false,
-- `false` closes auto expanded dirs, such as with `:Neotree reveal`
leave_dirs_open = false,
}, },
hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree -- netrw disabled, opening a directory opens neo-tree
-- in whatever position is specified in window.position -- in whatever position is specified in window.position
-- "open_current", -- netrw disabled, opening a directory opens within the -- "open_current", -- netrw disabled, opening a directory opens within the
-- window like netrw would, regardless of window.position -- window like netrw would, regardless of window.position
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs -- "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 hijack_netrw_behavior = "open_default",
-- This will use the OS level file watchers to detect changes
-- instead of relying on nvim autocmd events. -- instead of relying on nvim autocmd events.
use_libuv_file_watcher = true,
window = { window = {
mappings = { mappings = {
["."] = "set_root", ["."] = "set_root",
["/"] = "fuzzy_finder", ["/"] = "fuzzy_finder",
["#"] = "fuzzy_sorter", -- fuzzy sorting using the fzy algorithm -- fuzzy sorting using the fzy algorithm
["#"] = "fuzzy_sorter",
["<bs>"] = "navigate_up", ["<bs>"] = "navigate_up",
["<c-up>"] = "navigate_up", ["<c-up>"] = "navigate_up",
["<c-x>"] = "clear_filter", ["<c-x>"] = "clear_filter",
@@ -370,7 +414,8 @@ return {
["gp"] = "prev_git_modified", ["gp"] = "prev_git_modified",
["H"] = "toggle_hidden", ["H"] = "toggle_hidden",
}, },
fuzzy_finder_mappings = { -- define keymaps for filter popup window in fuzzy_finder_mode -- define keymaps for filter popup window in fuzzy_finder_mode
fuzzy_finder_mappings = {
["<down>"] = "move_cursor_down", ["<down>"] = "move_cursor_down",
["<C-n>"] = "move_cursor_down", ["<C-n>"] = "move_cursor_down",
["<up>"] = "move_cursor_up", ["<up>"] = "move_cursor_up",
@@ -380,11 +425,14 @@ return {
}, },
buffers = { buffers = {
follow_current_file = { follow_current_file = {
enabled = true, -- This will find and focus the file in the active buffer every time -- This will find and focus the file in the active buffer every time
-- -- the current file is changed while the tree is open. -- the current file is changed while the tree is open.
leave_dirs_open = true, -- `false` closes auto expanded dirs, such as with `:Neotree reveal` enabled = true,
-- `false` closes auto expanded dirs, such as with `:Neotree reveal`
leave_dirs_open = true,
}, },
group_empty_dirs = true, -- when true, empty folders will be grouped together -- when true, empty folders will be grouped together
group_empty_dirs = true,
show_unloaded = true, show_unloaded = true,
window = { window = {
mappings = { mappings = {

View File

@@ -1,6 +1,9 @@
local prefix = "<leader>a" -- A better annotation generator. Supports multiple languages and annotation conventions.
-- https://github.com/danymat/neogen
return { return {
"danymat/neogen", "danymat/neogen",
dependencies = "nvim-treesitter/nvim-treesitter",
version = "*",
cmd = "Neogen", cmd = "Neogen",
opts = { opts = {
snippet_engine = "luasnip", snippet_engine = "luasnip",
@@ -11,10 +14,10 @@ return {
}, },
}, },
keys = { keys = {
{ prefix .. "<cr>", function() require("neogen").generate({ type = "current" }) end, desc = "Current" }, { "<leader>aa", function() require("neogen").generate({ type = "current" }) end, desc = "Current" },
{ prefix .. "c", function() require("neogen").generate({ type = "class" }) end, desc = "Class" }, { "<leader>ac", function() require("neogen").generate({ type = "class" }) end, desc = "Class" },
{ prefix .. "f", function() require("neogen").generate({ type = "func" }) end, desc = "Function" }, { "<leader>af", function() require("neogen").generate({ type = "func" }) end, desc = "Function" },
{ prefix .. "t", function() require("neogen").generate({ type = "type" }) end, desc = "Type" }, { "<leader>at", function() require("neogen").generate({ type = "type" }) end, desc = "Type" },
{ prefix .. "F", function() require("neogen").generate({ type = "file" }) end, desc = "File" }, { "<leader>aF", function() require("neogen").generate({ type = "file" }) end, desc = "File" },
}, },
} }

View File

@@ -1,3 +1,4 @@
-- luacheck: globals vim
-- Completion menu. -- Completion menu.
-- Icons to display. -- Icons to display.
@@ -140,6 +141,7 @@ return {
-- Formatting the menu display. -- Formatting the menu display.
formatting = { formatting = {
expandable_indicator = true,
fields = { "kind", "abbr", "menu" }, fields = { "kind", "abbr", "menu" },
format = function(_, vim_item) format = function(_, vim_item)
vim_item.menu = vim_item.kind vim_item.menu = vim_item.kind
@@ -202,7 +204,7 @@ return {
{ {
name = "nvim_lsp", name = "nvim_lsp",
priority = 11, priority = 11,
--max_item_count = 10, max_item_count = 10,
}, },
-- Snippets in general to facilitate life. -- Snippets in general to facilitate life.

View File

@@ -1,10 +1,8 @@
-- --
-- Shows how to use the DAP plugin to debug your code. -- Shows how to use the DAP plugin to debug your code.
-- --
-- Primarily focused on configuring the debugger for Go, but can -- https://github.com/mfussenegger/nvim-dap
-- be extended to other languages as well. That's why it's called -- luacheck: globals vim
-- kickstart.nvim and not kitchen-sink.nvim ;)
return { return {
"mfussenegger/nvim-dap", "mfussenegger/nvim-dap",
dependencies = { dependencies = {
@@ -30,7 +28,7 @@ return {
-- You can provide additional configuration to the handlers, -- You can provide additional configuration to the handlers,
-- see mason-nvim-dap README for more information -- see mason-nvim-dap README for more information
handlers = {}, -- handlers = {},
-- You'll need to check that you have the required things installed -- You'll need to check that you have the required things installed
-- online, please don't ask me how to install them :) -- online, please don't ask me how to install them :)
@@ -39,6 +37,7 @@ return {
"bash", "bash",
"delve", "delve",
"js", "js",
"lua",
"php", "php",
"python", "python",
}, },

View File

@@ -4,14 +4,15 @@ return {
dependencies = { dependencies = {
-- Automatically install LSPs to stdpath for neovim -- Automatically install LSPs to stdpath for neovim
{ "williamboman/mason.nvim", config = true }, { "williamboman/mason.nvim", config = true },
"williamboman/mason-lspconfig.nvim", { "williamboman/mason-lspconfig.nvim" },
-- Useful status updates for LSP -- Useful status updates for LSP
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ "j-hui/fidget.nvim", tag = "legacy", opts = {} }, -- NOTE: using tag legacy, fidget is being re-written completely
{ "j-hui/fidget.nvim", event = "LspAttach", tag = "legacy", opts = {} },
-- Additional lua configuration, makes nvim stuff amazing! -- Additional lua configuration, makes nvim stuff amazing!
"folke/neodev.nvim", { "folke/neodev.nvim" },
}, },
init = function() init = function()
-- disable lsp watcher. Too slow on linux -- disable lsp watcher. Too slow on linux

View File

@@ -1,9 +0,0 @@
return {
"chrisgrieser/nvim-origami",
event = "BufReadPost", -- later or on keypress would prevent saving folds
opts = {
keepFoldsAcrossSessions = true,
pauseFoldsOnSearch = true,
setupFoldKeymaps = true,
},
}

View File

@@ -1,5 +0,0 @@
return {
"bennypowers/nvim-regexplainer",
opts = {},
ft = { "html", "javascript", "javascriptreact", "typescript", "typescriptreact" },
}

View File

@@ -1,17 +0,0 @@
--[[
Old text Command New text
--------------------------------------------------------------------------------
surround_words ysiw) (surround_words)
make strings ys$" "make strings"
[delete ar*ound me!] ds] delete around me!
"change quot*es" cs'" "change quotes"
<b>or tag* types</b> csth1<CR> <h1>or tag types</h1>
delete(functi*on calls) dsf function calls
]]
return {
"kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use `main` branch for the latest features
event = "VeryLazy",
config = function() require("nvim-surround").setup() end,
}

View File

@@ -1,9 +0,0 @@
return {
"nvim-treesitter/nvim-treesitter-context",
lazy = false,
enabled = true,
opts = {
enable = true,
mode = "cursor", -- cursor, or topline
},
}

View File

@@ -1,110 +1,133 @@
-- Treesitter (more highlight for syntax_on). -- Nvim Treesitter configurations and abstraction layer
-- https://github.com/nvim-treesitter/nvim-treesitter
-- luacheck: globals vim
return { return {
"nvim-treesitter/nvim-treesitter", {
build = ":TSUpdate", "nvim-treesitter/nvim-treesitter",
config = function() build = ":TSUpdate",
require("nvim-treesitter.configs").setup({ config = function()
-- Add languages to be installed here that you want installed for treesitter require("nvim-treesitter.configs").setup({
ensure_installed = { -- Install parsers synchronously (only applied to `ensure_installed`)
"bash", sync_install = false,
"c",
"cmake",
"comment",
"diff",
"dockerfile",
"gitignore",
"go",
"graphql",
"html",
"javascript",
"json",
"json5",
"latex",
"lua",
"markdown",
"php",
"phpdoc",
"python",
"regex",
"scss",
"terraform",
"todotxt",
"toml",
"tsx",
"typescript",
"vim",
"vimdoc",
"vue",
"yaml",
},
-- Autoinstall languages that are not installed. -- Automatically install missing parsers when entering buffer
auto_install = true, -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = true,
highlight = { -- List of parsers to ignore installing (or "all")
enable = true, ignore_install = {},
disable = {},
--injections = { modules = {},
-- python = {
-- docstrings: "markdown", -- Add languages to be installed here that you want installed for treesitter
-- }, ensure_installed = {
--} "bash",
}, "c",
indent = { enable = true }, "cmake",
incremental_selection = { "comment",
enable = true, "diff",
keymaps = { "dockerfile",
init_selection = "<c-space>", "gitignore",
node_incremental = "<c-space>", "go",
scope_incremental = "<c-s>", "graphql",
node_decremental = "<M-space>", "html",
"javascript",
"json",
"json5",
"latex",
"lua",
"markdown",
"php",
"phpdoc",
"python",
"regex",
"scss",
"terraform",
"todotxt",
"toml",
"tsx",
"typescript",
"vim",
"vimdoc",
"vue",
"yaml",
}, },
},
textobjects = { highlight = {
select = { enable = true,
disable = {},
--injections = {
-- python = {
-- docstrings: "markdown",
-- },
--}
},
indent = { enable = true },
incremental_selection = {
enable = true, enable = true,
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
keymaps = { keymaps = {
-- You can use the capture groups defined in textobjects.scm init_selection = "<c-space>",
["aa"] = "@parameter.outer", node_incremental = "<c-space>",
["ia"] = "@parameter.inner", scope_incremental = "<c-s>",
["af"] = "@function.outer", node_decremental = "<M-space>",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
}, },
}, },
move = { textobjects = {
enable = true, select = {
set_jumps = true, -- whether to set jumps in the jumplist enable = true,
goto_next_start = { -- Automatically jump forward to textobj, similar to targets.vim
["]m"] = "@function.outer", lookahead = true,
["]]"] = "@class.outer", keymaps = {
-- You can use the capture groups defined in textobjects.scm
["aa"] = "@parameter.outer",
["ia"] = "@parameter.inner",
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
},
}, },
goto_next_end = { move = {
["]M"] = "@function.outer", enable = true,
["]["] = "@class.outer", -- whether to set jumps in the jumplist
set_jumps = true,
goto_next_start = {
["]m"] = "@function.outer",
["]]"] = "@class.outer",
},
goto_next_end = {
["]M"] = "@function.outer",
["]["] = "@class.outer",
},
goto_previous_start = {
["[m"] = "@function.outer",
["[["] = "@class.outer",
},
goto_previous_end = {
["[M"] = "@function.outer",
["[]"] = "@class.outer",
},
}, },
goto_previous_start = { swap = {
["[m"] = "@function.outer", enable = true,
["[["] = "@class.outer", swap_next = {
}, ["<leader>a"] = "@parameter.inner",
goto_previous_end = { },
["[M"] = "@function.outer", swap_previous = {
["[]"] = "@class.outer", ["<leader>A"] = "@parameter.inner",
},
}, },
}, },
swap = { })
enable = true, end,
swap_next = { },
["<leader>a"] = "@parameter.inner", {
}, "nvim-treesitter/nvim-treesitter-context",
swap_previous = { lazy = false,
["<leader>A"] = "@parameter.inner", enabled = true,
}, opts = {
}, enable = true,
}, mode = "cursor", -- cursor, or topline
}) },
end, }
} }

View File

@@ -1,55 +0,0 @@
-- Fold code.
return {
"anuvyklack/pretty-fold.nvim",
config = {
fill_char = "",
sections = {
left = {
"content",
},
right = {
" ",
"number_of_folded_lines",
": ",
"percentage",
" ",
function(config) return config.fill_char:rep(3) end,
},
},
remove_fold_markers = false,
-- Keep the indentation of the content of the fold string.
keep_indentation = true,
-- Possible values:
-- "delete" : Delete all comment signs from the fold string.
-- "spaces" : Replace all comment signs with equal number of spaces.
-- false : Do nothing with comment signs.
process_comment_signs = "spaces",
-- Comment signs additional to the value of `&commentstring` option.
comment_signs = {
{ "/**", "*/" }, -- multiline comment
{ "<!--", "-->" }, -- multiline comment
{ "%--[[", "--]]" }, -- multiline comment
},
-- List of patterns that will be removed from content foldtext section.
stop_words = {
"@brief%s*", -- (for C++) Remove '@brief' and all spaces after.
},
add_close_pattern = true,
matchup_patterns = {
{ "{", "}" },
{ "%(", ")" }, -- % to escape lua pattern char
{ "%[", "]" }, -- % to escape lua pattern char
{ "if%s", "end" },
{ "do%s", "end" },
{ "for%s", "end" },
{ "function%s*%(", "end" }, -- 'function(' or 'function ('
},
},
}

View File

@@ -1,14 +0,0 @@
return {
{
"jay-babu/project.nvim",
name = "project_nvim",
event = "VeryLazy",
opts = { ignore_lsp = { "lua_ls" } },
},
{
"nvim-telescope/telescope.nvim",
optional = true,
dependencies = { "project_nvim" },
opts = function() require("telescope").load_extension("projects") end,
},
}

View File

@@ -1,6 +1,9 @@
return { return {
"ThePrimeagen/refactoring.nvim", "ThePrimeagen/refactoring.nvim",
dependencies = { "nvim-lua/plenary.nvim", "nvim-treesitter/nvim-treesitter" }, dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
},
cmd = { "Refactor" }, cmd = { "Refactor" },
opts = {}, opts = {},
keys = { keys = {

View File

@@ -1,7 +0,0 @@
return {
"m4xshen/smartcolumn.nvim",
opts = {
colorcolumn = { "80", "100", "120" },
disabled_filetypes = { "help", "text", "markdown", "json", "lazy", "starter", "neo-tree" },
},
}

View File

@@ -1 +0,0 @@
return { "stevearc/stickybuf.nvim", opts = {} }

View File

@@ -1,8 +0,0 @@
return {
"codota/tabnine-nvim",
name = "tabnine",
build = vim.loop.os_uname().sysname == "Windows_NT" and "pwsh.exe -file .\\dl_binaries.ps1" or "./dl_binaries.sh",
cmd = { "TabnineStatus", "TabnineDisable", "TabnineEnable", "TabnineToggle" },
event = "User",
opts = { accept_keymap = "<C-e>" },
}

View File

@@ -1,9 +1,11 @@
-- Telescope, a see-all-through file manager. -- Telescope, a see-all-through file manager.
-- vim: ts=2 sw=2 si et
-- luacheck: globals vim
return { return {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
dependencies = { dependencies = {
"nvim-lua/popup.nvim", { "nvim-lua/plenary.nvim" },
"nvim-lua/plenary.nvim", { "nvim-lua/popup.nvim" },
-- Fuzzy Finder Algorithm which requires local dependencies to be built. -- Fuzzy Finder Algorithm which requires local dependencies to be built.
-- Only load if `make` is available. Make sure you have the system -- Only load if `make` is available. Make sure you have the system
-- requirements installed. -- requirements installed.
@@ -14,7 +16,7 @@ return {
build = "make", build = "make",
cond = function() return vim.fn.executable("make") == 1 end, cond = function() return vim.fn.executable("make") == 1 end,
}, },
"nvim-telescope/telescope-file-browser.nvim", { "nvim-telescope/telescope-file-browser.nvim" },
}, },
config = function() config = function()
local actions = require("telescope.actions") local actions = require("telescope.actions")
@@ -77,56 +79,77 @@ return {
-- Developer configurations: Not meant for general override -- Developer configurations: Not meant for general override
buffer_previewer_maker = previewers.buffer_previewer_maker, buffer_previewer_maker = previewers.buffer_previewer_maker,
}, },
pickers = {
buffers = {
mappings = {
i = {
["<c-d>"] = actions.delete_buffer + actions.move_to_top,
},
},
},
},
extensions_list = { "themes", "terms" }, extensions_list = { "themes", "terms" },
}) })
pcall(require("telescope").load_extension, "fzf") pcall(require("telescope").load_extension, "fzf")
pcall(require("telescope").load_extension, "file_browser") pcall(require("telescope").load_extension, "file_browser")
pcall(require("telescope").load_extension, "harpoon")
-- See `:help telescope.builtin` -- See `:help telescope.builtin`
vim.keymap.set("n", "<leader>?", require("telescope.builtin").oldfiles, { desc = "[?] Find recently opened files" }) local tbi = require("telescope.builtin")
vim.keymap.set("n", "<leader><space>", require("telescope.builtin").buffers, { desc = "[ ] Find existing buffers" }) local wk = require("which-key")
vim.keymap.set("n", "<leader>/", function() wk.register({
-- You can pass additional configuration to telescope to change theme, layout, etc. ["?"] = {
require("telescope.builtin").current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({ function() tbi.oldfiles() end,
winblend = 10, "[?] Find recently opened files",
previewer = false, },
})) ["<space>"] = {
end, { desc = "[/] Fuzzily search in current buffer" }) function() tbi.buffers() end,
"[ ] Find existing buffers",
},
["/"] = {
function()
-- You can pass additional configuration to telescope to change theme, layout, etc.
tbi.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({
winblend = 10,
previewer = false,
}))
end,
"[/] Fuzzily search in current buffer",
},
vim.keymap.set( t = {
"n", b = {
"<leader>tg", "<cmd>Telescope file_browser<CR>",
require("telescope.builtin").git_files, "[T]elescope: File [B]rowser",
{ desc = "[T]elescope: Search [G]it files" } },
) d = {
vim.keymap.set("n", "<leader>tf", require("telescope.builtin").find_files, { desc = "[T]elescope: Search [F]iles" }) function() tbi.diagnostics() end,
vim.keymap.set("n", "<leader>th", require("telescope.builtin").help_tags, { desc = "[T]elescope: Search [H]elp" }) "[T]elescope: Search [D]iagnostics",
vim.keymap.set( },
"n",
"<leader>tw",
require("telescope.builtin").grep_string,
{ desc = "[T]elescope: Search current [W]ord" }
)
vim.keymap.set(
"n",
"<leader>tr",
require("telescope.builtin").live_grep,
{ desc = "[T]elescope: Search by G[r]ep" }
)
vim.keymap.set(
"n",
"<leader>td",
require("telescope.builtin").diagnostics,
{ desc = "[T]elescope: Search [D]iagnostics" }
)
vim.keymap.set( f = {
"n", function() tbi.find_files() end,
"<leader>tb", "[T]elescope: Search [F]iles",
":Telescope file_browser<CR>", },
{ desc = "[T]elescope: File [B]rowser", noremap = true } g = {
) function() tbi.git_files() end,
"[T]elescope: Search [G]it files",
},
h = {
function() tbi.help_tags() end,
"[T]elescope: Search [H]elp",
},
r = {
function() tbi.live_grep() end,
"[T]elescope: Search by G[r]ep",
},
w = {
function() tbi.grep_string() end,
"[T]elescope: Search current [W]ord",
},
},
}, { prefix = "<leader>" })
end, end,
} }

View File

@@ -1,48 +1,83 @@
-- Trouble for diagnostics of plugins -- A pretty diagnostics, references, telescope results,
-- quickfix and location list to help you solve all
-- the trouble your code is causing.
-- https://github.com/folke/trouble.nvim
return { return {
"folke/trouble.nvim", "folke/trouble.nvim",
dependencies = "kyazdani42/nvim-web-devicons", dependencies = "kyazdani42/nvim-web-devicons",
config = { config = {
-- your configuration comes here -- position of the list can be: bottom, top, left, right
-- or leave it empty to use the default settings position = "bottom",
-- refer to the configuration section below -- height of the trouble list when position is top or bottom
height = 10,
position = "bottom", -- position of the list can be: bottom, top, left, right -- width of the list when position is left or right
height = 10, -- height of the trouble list when position is top or bottom width = 50,
width = 50, -- width of the list when position is left or right -- use devicons for filenames
icons = true, -- use devicons for filenames icons = true,
mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist" -- "workspace_diagnostics", "document_diagnostics",
fold_open = "", -- icon used for open folds -- "quickfix", "lsp_references", "loclist"
fold_closed = "", -- icon used for closed folds mode = "workspace_diagnostics",
group = true, -- group results by file -- icon used for open folds
padding = true, -- add an extra new line on top of the list fold_open = "",
action_keys = { -- key mappings for actions in the trouble list -- icon used for closed folds
fold_closed = "",
-- group results by file
group = true,
-- add an extra new line on top of the list
padding = true,
-- key mappings for actions in the trouble list
action_keys = {
-- map to {} to remove a mapping, for example: -- map to {} to remove a mapping, for example:
-- close = {}, -- close = {},
close = "q", -- close the list
cancel = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor -- close the list
refresh = "r", -- manually refresh close = "q",
jump = { "<cr>", "<tab>" }, -- jump to the diagnostic or open / close folds -- cancel the preview and get back to your last window / buffer / cursor
open_split = { "<c-x>" }, -- open buffer in new split cancel = "<esc>",
open_vsplit = { "<c-v>" }, -- open buffer in new vsplit -- manually refresh
open_tab = { "<c-t>" }, -- open buffer in new tab refresh = "r",
jump_close = { "o" }, -- jump to the diagnostic and close the list -- jump to the diagnostic or open / close folds
toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode jump = { "<cr>", "<tab>" },
toggle_preview = "P", -- toggle auto_preview -- open buffer in new split
hover = "K", -- opens a small popup with the full multiline message open_split = { "<c-x>" },
preview = "p", -- preview the diagnostic location -- open buffer in new vsplit
close_folds = { "zM", "zm" }, -- close all folds open_vsplit = { "<c-v>" },
open_folds = { "zR", "zr" }, -- open all folds -- open buffer in new tab
toggle_fold = { "zA", "za" }, -- toggle fold of current file open_tab = { "<c-t>" },
previous = "k", -- preview item -- jump to the diagnostic and close the list
next = "j", -- next item jump_close = { "o" },
-- toggle between "workspace" and "document" diagnostics mode
toggle_mode = "m",
-- toggle auto_preview
toggle_preview = "P",
-- opens a small popup with the full multiline message
hover = "K",
-- preview the diagnostic location
preview = "p",
-- close all folds
close_folds = { "zM", "zm" },
-- open all folds
open_folds = { "zR", "zr" },
-- toggle fold of current file
toggle_fold = { "zA", "za" },
-- preview item
previous = "k",
-- next item
next = "j",
}, },
indent_lines = true, -- add an indent guide below the fold icons -- add an indent guide below the fold icons
auto_open = false, -- automatically open the list when you have diagnostics indent_lines = true,
auto_close = false, -- automatically close the list when you have no diagnostics -- automatically open the list when you have diagnostics
auto_preview = true, -- automatically preview the location of the diagnostic. <esc> to close preview and go back to last window auto_open = true,
auto_fold = false, -- automatically fold a file trouble list at creation -- automatically close the list when you have no diagnostics
auto_jump = { "lsp_definitions" }, -- for the given modes, automatically jump if there is only a single result auto_close = true,
-- automatically preview the location of the diagnostic.
-- <esc> to close preview and go back to last window
auto_preview = true,
-- automatically fold a file trouble list at creation
auto_fold = false,
-- for the given modes, automatically jump if there is only a single result
auto_jump = { "lsp_definitions" },
signs = { signs = {
-- icons / text used for a diagnostic -- icons / text used for a diagnostic
error = "", error = "",
@@ -51,6 +86,7 @@ return {
information = "", information = "",
other = "", other = "",
}, },
use_diagnostic_signs = false, -- enabling this will use the signs defined in your lsp client -- enabling this will use the signs defined in your lsp client
use_diagnostic_signs = false,
}, },
} }

View File

@@ -1,4 +1,6 @@
-- Dim -- Twilight dims inactive portions of the
-- code you're editing using TreeSitter
-- https://github.com/folke/twilight.nvim
return { return {
"folke/twilight.nvim", "folke/twilight.nvim",
config = { config = {

View File

@@ -1,54 +0,0 @@
-- Colorizer for strings.
-- Minimise code.
local set = vim.api.nvim_set_var
return {
"RRethy/vim-hexokinase",
build = "cd ~/.local/share/nvim/lazy/vim-hexokinase && make hexokinase",
init = function()
-- All possible highlighters
set("Hexokinase_highlighters", {
"virtual",
"sign_column",
"background",
"backgroundfull",
-- 'foreground',
-- 'foregroundfull'
})
-- Patterns to match for all filetypes
-- Can be a comma separated string or a list of strings
-- All possible values
set("Hexokinase_optInPatterns", {
"full_hex",
"triple_hex",
"rgb",
"rgba",
"hsl",
"hsla",
"colour_names",
})
-- Filetype specific patterns to match
-- entry value must be comma seperated list
set("Hexokinase_ftOptInPatterns", {
css = "full_hex,rgb,rgba,hsl,hsla,colour_names",
html = "full_hex,rgb,rgba,hsl,hsla,colour_names",
})
-- Sample value, to keep default behaviour don't define this', variable
set("Hexokinase_ftEnabled", {
"css",
"html",
"javascript",
"scss",
"sass",
"lua",
})
-- Turn the colors on.
--vim.cmd('au BufEnter * HexokinaseTurnOn')
end,
}

View File

@@ -1,23 +0,0 @@
-- Move faster between context.
return {
"andymass/vim-matchup",
dependencies = "nvim-treesitter/nvim-treesitter",
config = {
highlight = {
enable = true,
disable = {},
},
indent = {
enable = false,
disable = {},
},
autotag = {
enable = true,
},
matchup = {
enable = true, -- mandatory, false will disable the whole extension
--disable = { "c", "ruby" }, -- optional, list of language that will be disabled
},
},
}

View File

@@ -1 +0,0 @@
return { "tpope/vim-sleuth" }

View File

@@ -1,5 +0,0 @@
return {
"wakatime/vim-wakatime",
lazy = false,
enabled = true,
}

View File

@@ -1,15 +0,0 @@
local vim = vim
return {
"folke/which-key.nvim",
enabled = true,
lazy = false,
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
end,
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
},
}

View File

@@ -83,31 +83,18 @@ set -g @catppuccin_flavour 'mocha' # latte/frappe/macchiato/mocha
set -g @catppuccin_window_tabs_enabled on # or off to disable window_tabs set -g @catppuccin_window_tabs_enabled on # or off to disable window_tabs
set -g @catppuccin_window_status_enable "yes" set -g @catppuccin_window_status_enable "yes"
set -g @catppuccin_window_left_separator "" set -g @catppuccin_window_right_separator ""
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_middle_separator " █"
set -g @catppuccin_window_number_position "right" set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_middle_separator " | "
set -g @catppuccin_window_default_fill "number" set -g @catppuccin_window_default_fill "none"
set -g @catppuccin_window_default_text "#W" set -g @catppuccin_window_current_fill "all"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W"
set -g @catppuccin_status_modules "application session date_time" set -g @catppuccin_status_modules "application session date_time"
set -g @catppuccin_status_left_separator "█"
set -g @catppuccin_status_right_separator "█"
set -g @catppuccin_date_time_text "%Y-%m-%d %H:%M" set -g @catppuccin_date_time_text "%Y-%m-%d %H:%M"
set -g @catppuccin_status_left_separator " "
set -g @catppuccin_status_right_separator ""
set -g @catppuccin_status_right_separator_inverse "no"
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"
set -g @catppuccin_directory_text "#{pane_current_path}"
## https://github.com/MunifTanjim/tmux-mode-indicator ## https://github.com/MunifTanjim/tmux-mode-indicator
set -g status-right '%Y-%m-%d %H:%M #{tmux_mode_indicator}' set -g status-right '%Y-%m-%d %H:%M #{tmux_mode_indicator}'
set -g @mode_indicator_prefix_prompt ' WAIT ' set -g @mode_indicator_prefix_prompt ' WAIT '
set -g @mode_indicator_copy_prompt ' COPY ' set -g @mode_indicator_copy_prompt ' COPY '
set -g @mode_indicator_sync_prompt ' SYNC ' set -g @mode_indicator_sync_prompt ' SYNC '
@@ -143,11 +130,11 @@ set -g @tnotify-verbose 'on'
# set vi-mode # set vi-mode
set-window-option -g mode-keys vi set-window-option -g mode-keys vi
# keybindings # keybindings
bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind '"' split-window -v -c "#{pane_current_path}" bind '"' split-window -v -c "#{pane_current_path}"
bind '!' split-window -h -c "#{pane_current_path}" bind '!' split-window -h -c "#{pane_current_path}"

View File

@@ -9,13 +9,14 @@ export DOTFILES="$HOME/.dotfiles"
# Run x-load-configs in your terminal to reload the files. # Run x-load-configs in your terminal to reload the files.
function x-load-configs() function x-load-configs()
{ {
# Load the shell dotfiles, and then some: HOST="$(hostname -s)"
for file in $DOTFILES/config/{exports,alias,functions}; do # Load the shell dotfiles, and then some:
[ -r "$file" ] && [ -f "$file" ] && source "$file" for file in $DOTFILES/config/{exports,alias,functions}; do
[ -r "$file-secret" ] && [ -f "$file-secret" ] && source "$file-secret" [ -r "$file" ] && source "$file"
[ -r "$file-$HOSTNAME" ] && [ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME" [ -r "$file-secret" ] && source "$file-secret"
[ -r "$file-$HOSTNAME-secret" ] && [ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret" [ -r "$file-$HOST" ] && source "$file-$HOST"
done [ -r "$file-$HOST-secret" ] && source "$file-$HOST-secret"
done
} }
x-load-configs x-load-configs

View File

@@ -184,8 +184,8 @@ function section_helpers
case "$1" in case "$1" in
path) path)
# shellcheck disable=2001 # shellcheck disable=2001
for i in $(echo "$PATH" | sed 's/:/ /g'); do echo "$i"; done; for i in $(echo "$PATH" | sed 's/:/ /g'); do echo "$i"; done
;; ;;
*) menu_usage "$USAGE_PREFIX" "${MENU[@]}" ;; *) menu_usage "$USAGE_PREFIX" "${MENU[@]}" ;;
esac esac
} }
@@ -250,10 +250,12 @@ function section_dotfiles
shfmt) shfmt)
# Format shell scripts according to following rules. # Format shell scripts according to following rules.
find "$DOTFILES" \ find "$DOTFILES" \
-type f -perm +111 \ -type f -executable \
-not -path '*/.git/*' \ -not -path '*/.git/*' \
-not -path '*dotbot*' \ -not -path '*dotbot*' \
-not -path '*tmux*' \ -not -path '*config/fzf*' \
-not -path '*bin/fzf*' \
-not -path '*tmux/plugins*' \
-not -name '*.pl' \ -not -name '*.pl' \
-not -name '*.py' \ -not -name '*.py' \
-not -name '*.php' \ -not -name '*.php' \

View File

@@ -4,4 +4,3 @@
# and anyone else who expects to see a 'python' executable # and anyone else who expects to see a 'python' executable
exec python3 "$@" exec python3 "$@"

View File

@@ -31,26 +31,28 @@
# 2. Functions to minise code. # 2. Functions to minise code.
#{ #{
# I. # I.
notify () { notify()
{
notify-call \ notify-call \
--replace-file "$replace_id" \ --replace-file "$replace_id" \
"$@" "$@"
} }
# II. # II.
stop () { stop()
{
# A. # A.
#pkill -INT -f 'ffmpeg -f alsa -ac 1 -i pulse -f x11grab -r 30 -s ' #pkill -INT -f 'ffmpeg -f alsa -ac 1 -i pulse -f x11grab -r 30 -s '
giph --stop giph --stop
# C. # C.
eww update record_menu=false eww update record_menu=false
} }
#} #}
# #. Kill previous giph process. # #. Kill previous giph process.
@@ -76,7 +78,7 @@ fi
case "$1" in case "$1" in
# A. Supported. # A. Supported.
'mkv' | 'gif' | 'webm' | 'mp4' ) ;; 'mkv' | 'gif' | 'webm' | 'mp4') ;;
# B. Not supported. # B. Not supported.
*) *)
@@ -93,7 +95,7 @@ fi
# II. Execute itself. # II. Execute itself.
exec $0 $format $2 exec $0 $format $2
;; ;;
esac esac
@@ -170,7 +172,7 @@ fi
gtk-launch \ gtk-launch \
"$(xdg-mime query default inode/directory)" \ "$(xdg-mime query default inode/directory)" \
"$path_recordings/" \ "$path_recordings/" \
>/dev/null 2>&1 & > /dev/null 2>&1 &
fi fi

0
local/share/fonts/JetBrainsMono-AUTHORS.txt Executable file → Normal file
View File

View File

@@ -7,10 +7,13 @@ source "$HOME/.dotfiles/scripts/shared.sh"
FZF_GIT="https://github.com/junegunn/fzf.git" FZF_GIT="https://github.com/junegunn/fzf.git"
FZF_PATH="${XDG_CONFIG_HOME}/fzf" FZF_PATH="${XDG_CONFIG_HOME}/fzf"
FZF_BUILD="/tmp/fzf"
if [ ! -d "$FZF_PATH" ]; then if [ ! -d "$FZF_BUILD" ]; then
git clone --depth 1 "$FZF_GIT" "$FZF_PATH" git clone --depth 1 "$FZF_GIT" "$FZF_BUILD"
"$FZF_PATH/install" --xdg --all --no-update-rc "$FZF_BUILD/install" \
--xdg \
--bin
else else
msg_done "fzf ($FZF_PATH/) already installed" msg_done "fzf ($FZF_PATH/) already installed"
fi fi

28
scripts/install-git-crypt.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
#
# Install git-crypt
# NOTE: Experimental, wip
#
# shellcheck source=shared.sh
source "$HOME/.dotfiles/scripts/shared.sh"
msg "Installing git-crypt"
! have git-crypt && {
REPO_URL="https://github.com/AGWA/git-crypt.git"
CHECK_PATH="${XDG_BIN_HOME}/git-crypt"
BUILD_PATH="/tmp/git-crypt"
rm -rf "$BUILD_PATH"
if [ ! -d "$CHECK_PATH" ]; then
git clone --depth 1 "$REPO_URL" "$BUILD_PATH" || true
cd "$BUILD_PATH" || msg_err "$BUILD_PATH not found"
make && make install PREFIX="$HOME/.local"
else
msg_done "git-crypt ($CHECK_PATH) already installed"
fi
}
msg_done "Done installing git-crypt"

View File

@@ -7,6 +7,8 @@ source "$HOME/.dotfiles/scripts/shared.sh"
! have go && msg "go hasn't been installed yet." && exit 0 ! have go && msg "go hasn't been installed yet." && exit 0
packages=( packages=(
# A shell parser, formatter, and interpreter with bash support; includes shfmt
mvdan.cc/sh/v3/cmd/shfmt@latest
# sysadmin/scripting utilities, distributed as a single binary # sysadmin/scripting utilities, distributed as a single binary
github.com/skx/sysbox@latest github.com/skx/sysbox@latest
# Git Profile allows you to switch between user profiles in git repos # Git Profile allows you to switch between user profiles in git repos

View File

@@ -336,4 +336,3 @@ ask()
fi fi
done done
} }