mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
Merge branch 'master' of https://github.com/js0ny/dotfiles
This commit is contained in:
commit
1804960bfc
14 changed files with 120 additions and 31 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -34,4 +34,8 @@ common/fzfrc
|
||||||
gitconfig
|
gitconfig
|
||||||
|
|
||||||
|
|
||||||
|
# Lock files
|
||||||
lazy-lock.json
|
lazy-lock.json
|
||||||
|
|
||||||
|
# Emacs
|
||||||
|
*.elc
|
||||||
|
|
|
||||||
|
|
@ -16,3 +16,8 @@
|
||||||
:nvom "C-w e" 'evil-window-up
|
:nvom "C-w e" 'evil-window-up
|
||||||
:nvom "C-w i" 'evil-window-right
|
:nvom "C-w i" 'evil-window-right
|
||||||
)
|
)
|
||||||
|
|
||||||
|
;; Swap ; and :
|
||||||
|
(map! :leader
|
||||||
|
";" #'execute-extended-command
|
||||||
|
":" #'pp-eval-expression)
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@
|
||||||
;;prodigy ; FIXME managing external services & code builders
|
;;prodigy ; FIXME managing external services & code builders
|
||||||
;;terraform ; infrastructure as code
|
;;terraform ; infrastructure as code
|
||||||
;;tmux ; an API for interacting with tmux
|
;;tmux ; an API for interacting with tmux
|
||||||
;;tree-sitter ; syntax and parsing, sitting in a tree...
|
tree-sitter ; syntax and parsing, sitting in a tree...
|
||||||
;;upload ; map local to remote projects via ssh/ftp
|
;;upload ; map local to remote projects via ssh/ftp
|
||||||
|
|
||||||
:os
|
:os
|
||||||
|
|
@ -148,7 +148,7 @@
|
||||||
latex ; writing papers in Emacs has never been so fun
|
latex ; writing papers in Emacs has never been so fun
|
||||||
;;lean ; for folks with too much to prove
|
;;lean ; for folks with too much to prove
|
||||||
;;ledger ; be audit you can be
|
;;ledger ; be audit you can be
|
||||||
;;lua ; one-based indices? one-based indices
|
lua ; one-based indices? one-based indices
|
||||||
markdown ; writing docs for people to ignore
|
markdown ; writing docs for people to ignore
|
||||||
;;nim ; python + lisp at the speed of c
|
;;nim ; python + lisp at the speed of c
|
||||||
;;nix ; I hereby declare "nix geht mehr!"
|
;;nix ; I hereby declare "nix geht mehr!"
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,9 @@
|
||||||
"C-c i" (lambda () (interactive) (my/insert-emphasis-with-zws ?/))
|
"C-c i" (lambda () (interactive) (my/insert-emphasis-with-zws ?/))
|
||||||
"C-c u" (lambda () (interactive) (my/insert-emphasis-with-zws ?_))
|
"C-c u" (lambda () (interactive) (my/insert-emphasis-with-zws ?_))
|
||||||
:nvom "N" 'org-next-visible-heading
|
:nvom "N" 'org-next-visible-heading
|
||||||
:nvom "E" 'org-previous-visible-heading)
|
:nvom "E" 'org-previous-visible-heading
|
||||||
|
:nvom "M-n" 'org-metadown
|
||||||
|
:nvom "M-e" 'org-metaup)
|
||||||
|
|
||||||
(setq org-capture-templates
|
(setq org-capture-templates
|
||||||
'(("t" "Task" entry (file+headline "~/OrgFiles/tasks/inbox.org" "Tasks")
|
'(("t" "Task" entry (file+headline "~/OrgFiles/tasks/inbox.org" "Tasks")
|
||||||
|
|
|
||||||
|
|
@ -22,11 +22,15 @@ alias sn="sudo nvim -u ~/.config/nvim/init.lua"
|
||||||
abbr --add py python3
|
abbr --add py python3
|
||||||
abbr --add ipy ipython
|
abbr --add ipy ipython
|
||||||
|
|
||||||
|
abbr --add g lazygit
|
||||||
|
|
||||||
# lsd - modern ls
|
# lsd - modern ls
|
||||||
if command -v lsd > /dev/null
|
if command -v lsd > /dev/null
|
||||||
alias ls='lsd -A'
|
alias ls='lsd'
|
||||||
abbr --add l 'lsd -lah'
|
abbr --add l 'lsd -lah'
|
||||||
abbr --add ll 'lsd -l'
|
abbr --add ll 'lsd -l'
|
||||||
|
abbr --add la 'lsd -A'
|
||||||
|
abbr --add l. 'lsd -d .*'
|
||||||
abbr --add tree 'ls --tree'
|
abbr --add tree 'ls --tree'
|
||||||
else
|
else
|
||||||
abbr --add l 'ls -lah'
|
abbr --add l 'ls -lah'
|
||||||
|
|
@ -53,6 +57,10 @@ function mt
|
||||||
mkdir -p (dirname $argv[1]) && touch $argv[1]
|
mkdir -p (dirname $argv[1]) && touch $argv[1]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function mtv
|
||||||
|
mkdir -p (dirname $argv[1]) && touch $argv[1] && nvim $argv[1]
|
||||||
|
end
|
||||||
|
|
||||||
# Use neovide as gVim
|
# Use neovide as gVim
|
||||||
abbr --add gvi "neovide"
|
abbr --add gvi "neovide"
|
||||||
|
|
||||||
|
|
@ -61,6 +69,7 @@ if command -v brew > /dev/null
|
||||||
abbr --add brewu "brew upgrade && brew update"
|
abbr --add brewu "brew upgrade && brew update"
|
||||||
abbr --add brewr "brew remove"
|
abbr --add brewr "brew remove"
|
||||||
abbr --add brewc "brew cleanup"
|
abbr --add brewc "brew cleanup"
|
||||||
|
abbr --add brewl "brew list"
|
||||||
end
|
end
|
||||||
|
|
||||||
if command -v pacman > /dev/null
|
if command -v pacman > /dev/null
|
||||||
|
|
@ -68,6 +77,7 @@ if command -v pacman > /dev/null
|
||||||
abbr --add paci "sudo pacman -S"
|
abbr --add paci "sudo pacman -S"
|
||||||
abbr --add pacr "sudo pacman -R"
|
abbr --add pacr "sudo pacman -R"
|
||||||
abbr --add pacu "sudo pacman -Syu"
|
abbr --add pacu "sudo pacman -Syu"
|
||||||
|
abbr --add pacl "pacman -Q"
|
||||||
if command -v paru > /dev/null
|
if command -v paru > /dev/null
|
||||||
abbr --add pacs "paru -Ss"
|
abbr --add pacs "paru -Ss"
|
||||||
else if command -v yay > /dev/null
|
else if command -v yay > /dev/null
|
||||||
|
|
@ -77,6 +87,15 @@ if command -v pacman > /dev/null
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if command -v apt > /dev/null
|
||||||
|
abbr --add apt "sudo apt"
|
||||||
|
abbr --add apti "sudo apt install"
|
||||||
|
abbr --add aptr "sudo apt remove"
|
||||||
|
abbr --add aptu "sudo apt update && sudo apt upgrade"
|
||||||
|
abbr --add apts "apt search"
|
||||||
|
abbr --add aptl "apt list --installed"
|
||||||
|
end
|
||||||
|
|
||||||
if test "$TERM" = "xterm-ghostty" -o "$TERM" = "xterm-kitty"
|
if test "$TERM" = "xterm-ghostty" -o "$TERM" = "xterm-kitty"
|
||||||
abbr --add icat "kitten icat"
|
abbr --add icat "kitten icat"
|
||||||
else if test "$TERM_PROGRAM" = "WezTerm"
|
else if test "$TERM_PROGRAM" = "WezTerm"
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ local M = {
|
||||||
Event = "",
|
Event = "",
|
||||||
Operator = "",
|
Operator = "",
|
||||||
TypeParameter = "",
|
TypeParameter = "",
|
||||||
|
Copilot = "",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
13
tools/nvim/lua/keymaps/cmp_map.lua
Normal file
13
tools/nvim/lua/keymaps/cmp_map.lua
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
--- `map` default for `cmp.mapping`
|
||||||
|
local map = function(map)
|
||||||
|
return {
|
||||||
|
{ keys = "<C-n>", cmd = map.select_next_item(), opts = { desc = "Select next completion item" } },
|
||||||
|
{ keys = "<C-p>", cmd = map.select_prev_item(), opts = { desc = "Select previous completion item" } },
|
||||||
|
{ keys = "<C-f>", cmd = map.confirm({ select = true }), opts = { desc = "Confirm completion" } },
|
||||||
|
{ keys = "<Tab>", cmd = map.confirm({ select = true }), opts = { desc = "Confirm completion" } },
|
||||||
|
{ keys = "<C-Space>", cmd = map.complete(), opts = { desc = "Trigger completion" } },
|
||||||
|
{ keys = "<C-b>", cmd = map.abort(), opts = { desc = "Abort completion" } },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return map
|
||||||
|
|
@ -20,17 +20,7 @@ utils.set_keymaps(keymaps_modifier)
|
||||||
|
|
||||||
M.nvim_tree_keymaps = require("keymaps.nvim-tree").plugin
|
M.nvim_tree_keymaps = require("keymaps.nvim-tree").plugin
|
||||||
|
|
||||||
--- `map` default for `cmp.mapping`
|
M.cmp_nvim_keymaps = require("keymaps.cmp_map")
|
||||||
function M.cmp_nvim_keymaps(map)
|
|
||||||
return {
|
|
||||||
{ keys = "<C-n>", cmd = map.select_next_item(), opts = { desc = "Select next completion item" } },
|
|
||||||
{ keys = "<C-p>", cmd = map.select_prev_item(), opts = { desc = "Select previous completion item" } },
|
|
||||||
{ keys = "<C-y>", cmd = map.confirm({ select = true }), opts = { desc = "Confirm completion" } },
|
|
||||||
{ keys = "<Tab>", cmd = map.confirm({ select = true }), opts = { desc = "Confirm completion" } },
|
|
||||||
{ keys = "<C-Space>", cmd = map.complete(), opts = { desc = "Trigger completion" } },
|
|
||||||
{ keys = "<C-e>", cmd = map.abort(), opts = { desc = "Abort completion" } },
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
-- local function set_markdown_keymaps(bufnr)
|
-- local function set_markdown_keymaps(bufnr)
|
||||||
-- local opts = { noremap = true, silent = true, buffer = bufnr }
|
-- local opts = { noremap = true, silent = true, buffer = bufnr }
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,24 @@
|
||||||
return {
|
return {
|
||||||
{ import = "plugins.mod.nvim-cmp" },
|
{ import = "plugins.mod.nvim-cmp" },
|
||||||
|
{
|
||||||
|
"saadparwaiz1/cmp_luasnip"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"L3MON4D3/LuaSnip",
|
"L3MON4D3/LuaSnip",
|
||||||
|
build = "make install_jsregexp",
|
||||||
|
config = function()
|
||||||
|
require("luasnip.loaders.from_vscode").load_standalone(
|
||||||
|
{
|
||||||
|
path = "~/.config/zed/snippets/c.json" }
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
-- TODO: Remove this, simply delete this will let nvim-cmp not work
|
||||||
dependencies = { "rafamadriz/friendly-snippets" },
|
dependencies = { "rafamadriz/friendly-snippets" },
|
||||||
},
|
},
|
||||||
{ "rafamadriz/friendly-snippets" },
|
{
|
||||||
|
"zbirenbaum/copilot-cmp",
|
||||||
|
config = function()
|
||||||
|
require("copilot_cmp").setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,37 @@
|
||||||
return {
|
return {
|
||||||
{ "wakatime/vim-wakatime", lazy = false },
|
{ "wakatime/vim-wakatime", lazy = false },
|
||||||
{ "voldikss/vim-floaterm" },
|
{ "voldikss/vim-floaterm" },
|
||||||
{ "CRAG666/betterTerm.nvim", opts = {
|
{
|
||||||
position = "bot",
|
"CRAG666/betterTerm.nvim",
|
||||||
size = 15,
|
opts = {
|
||||||
} },
|
position = "bot",
|
||||||
{ "CRAG666/code_runner.nvim", config = true },
|
size = 15,
|
||||||
{ import = "plugins.mod.obsidian-nvim" },
|
}
|
||||||
|
},
|
||||||
|
{ "CRAG666/code_runner.nvim", config = true },
|
||||||
|
-- { import = "plugins.mod.obsidian-nvim" },
|
||||||
{ import = "plugins.mod.which-keys-nvim" },
|
{ import = "plugins.mod.which-keys-nvim" },
|
||||||
{
|
{
|
||||||
"github/copilot.vim",
|
"zbirenbaum/copilot.lua",
|
||||||
lazy = false,
|
cmd = "Copilot",
|
||||||
|
build = ":Copilot auth",
|
||||||
|
event = "BufReadPost",
|
||||||
|
opts = {
|
||||||
|
suggestion = {
|
||||||
|
enabled = not vim.g.ai_cmp,
|
||||||
|
auto_trigger = true,
|
||||||
|
hide_during_completion = vim.g.ai_cmp,
|
||||||
|
keymap = {
|
||||||
|
accept = "<M-f>",
|
||||||
|
next = "<M-]>",
|
||||||
|
prev = "<M-[>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
panel = { enabled = false },
|
||||||
|
filetypes = {
|
||||||
|
markdown = true,
|
||||||
|
help = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ Remote | Git Branch | Diagnostics | Command | | MID | | Line:Column | Indent | E
|
||||||
local config = {
|
local config = {
|
||||||
options = {
|
options = {
|
||||||
disabled_filetypes = {
|
disabled_filetypes = {
|
||||||
statusline = { "NvimTree", "alpha" },
|
statusline = { "NvimTree", "alpha", "grug-far" },
|
||||||
},
|
},
|
||||||
-- Disable sections and component separators
|
-- Disable sections and component separators
|
||||||
component_separators = { left = "", right = "" },
|
component_separators = { left = "", right = "" },
|
||||||
|
|
|
||||||
|
|
@ -47,9 +47,9 @@ return {
|
||||||
},
|
},
|
||||||
mapping = cmp.mapping.preset.insert(mapped),
|
mapping = cmp.mapping.preset.insert(mapped),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
|
{ name = "copilot", priority = 10 },
|
||||||
{ name = "nvim_lsp" },
|
{ name = "nvim_lsp" },
|
||||||
{ name = "luasnip" },
|
{ name = "luasnip" },
|
||||||
{ name = "copilot" },
|
|
||||||
{ name = "lazydev", group_index = 0 },
|
{ name = "lazydev", group_index = 0 },
|
||||||
}, {
|
}, {
|
||||||
{ name = "buffer" },
|
{ name = "buffer" },
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ return {
|
||||||
"qf",
|
"qf",
|
||||||
"floaterm",
|
"floaterm",
|
||||||
"orgagenda",
|
"orgagenda",
|
||||||
|
"grug-far"
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -25,14 +25,16 @@ alias python=python3 # Set the default Python version to Python 3
|
||||||
alias py=python
|
alias py=python
|
||||||
alias ipy=ipython
|
alias ipy=ipython
|
||||||
|
|
||||||
alias reload="source $ZDOTDIR/.zshrc"
|
alias g=lazygit
|
||||||
|
|
||||||
|
|
||||||
# lsd - modern ls
|
# lsd - modern ls
|
||||||
if command -v lsd > /dev/null; then
|
if command -v lsd > /dev/null; then
|
||||||
alias ls='lsd -A'
|
alias ls='lsd'
|
||||||
alias l='lsd -lah'
|
alias l='lsd -lah'
|
||||||
alias ll='lsd -l'
|
alias ll='lsd -l'
|
||||||
|
alias la='lsd -A'
|
||||||
|
alias l.='lsd -d .*'
|
||||||
alias tree='lsd --tree -A'
|
alias tree='lsd --tree -A'
|
||||||
else
|
else
|
||||||
alias l='ls -lah'
|
alias l='ls -lah'
|
||||||
|
|
@ -56,6 +58,9 @@ tv(){
|
||||||
mt(){
|
mt(){
|
||||||
mkdir -p $(dirname $1) && touch $1
|
mkdir -p $(dirname $1) && touch $1
|
||||||
}
|
}
|
||||||
|
mtv(){
|
||||||
|
mkdir -p $(dirname $1) && touch $1 && nvim $1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
alias update="source $DOTFILES/scripts/update.zsh"
|
alias update="source $DOTFILES/scripts/update.zsh"
|
||||||
|
|
@ -65,20 +70,31 @@ if command -v pacman > /dev/null; then
|
||||||
alias paci="sudo pacman -S"
|
alias paci="sudo pacman -S"
|
||||||
alias pacr="sudo pacman -R"
|
alias pacr="sudo pacman -R"
|
||||||
alias pacu="sudo pacman -Syu"
|
alias pacu="sudo pacman -Syu"
|
||||||
|
alias pacl="pacman -Q"
|
||||||
|
if command -v paru > /dev/null; then
|
||||||
|
alias pacs="paru -Ss"
|
||||||
|
elif command -v yay > /dev/null; then
|
||||||
|
alias pacs="yay -Ss"
|
||||||
|
else
|
||||||
|
alias pacs="pacman -Ss"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v apt > /dev/null; then
|
if command -v apt > /dev/null; then
|
||||||
alias apt="sudo apt"
|
alias apt="sudo apt"
|
||||||
alias apti="sudo apt install"
|
alias apti="sudo apt install"
|
||||||
alias aptu="sudo apt update && sudo apt upgrade"
|
|
||||||
alias aptr="sudo apt remove"
|
alias aptr="sudo apt remove"
|
||||||
|
alias aptu="sudo apt update && sudo apt upgrade"
|
||||||
|
alias apts="apt search"
|
||||||
|
alias aptl="apt list --installed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v brew > /dev/null; then
|
if command -v brew > /dev/null; then
|
||||||
alias brewi="brew install"
|
alias brewi="brew install"
|
||||||
alias brewu="brew update && brew upgrade"
|
|
||||||
alias brewc="brew cleanup"
|
|
||||||
alias brewr="brew uninstall"
|
alias brewr="brew uninstall"
|
||||||
|
alias brewu="brew update && brew upgrade"
|
||||||
|
alias brews="brew search"
|
||||||
|
alias brewl="brew list"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue