Merge branch 'main' of ssh://git.clustercockpit.org:1073/moebiusband/dotfiles
This commit is contained in:
commit
39bad71b5b
@ -10,18 +10,8 @@ LICENSE
|
|||||||
.Xresources
|
.Xresources
|
||||||
.xsession
|
.xsession
|
||||||
.config/openbox/*
|
.config/openbox/*
|
||||||
.config/nvim/after
|
|
||||||
.config/nvim/lua/plugins/editor.lua
|
|
||||||
.config/nvim/lua/plugins/lsp.lua
|
.config/nvim/lua/plugins/lsp.lua
|
||||||
.config/nvim/lua/plugins/git.lua
|
|
||||||
.config/nvim/lua/plugins/treesitter.lua
|
|
||||||
.config/nvim/lua/plugins/format.lua
|
|
||||||
.config/nvim/lua/plugins/telescope.lua
|
|
||||||
{{ else }}
|
{{ else }}
|
||||||
.config/nvim/lazyvim.json
|
.config/fish/conf.d/fish-ssh-agent.fish
|
||||||
.config/nvim/stylua.toml
|
.config/fish/functions/__ssh_agent_*
|
||||||
.config/nvim/lua/config
|
|
||||||
.config/nvim/lua/plugins/telescope.lua
|
|
||||||
.config/nvim/lua/plugins/core.lua
|
|
||||||
.config/nvim/lua/plugins/disabled.lua
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
1
dot_config/broot/launcher/bash/br
Symbolic link
1
dot_config/broot/launcher/bash/br
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/home/jan/.local/share/broot/launcher/bash/1
|
4
dot_config/broot/launcher/installed-v4
Normal file
4
dot_config/broot/launcher/installed-v4
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
This file tells broot the installation of the br function was done.
|
||||||
|
If there's a problem and you want to install it again run
|
||||||
|
broot -- install
|
7
dot_config/fish/conf.d/fish-ssh-agent.fish
Normal file
7
dot_config/fish/conf.d/fish-ssh-agent.fish
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
if test -z "$SSH_ENV"
|
||||||
|
set -xg SSH_ENV $HOME/.ssh/environment
|
||||||
|
end
|
||||||
|
|
||||||
|
if not __ssh_agent_is_started
|
||||||
|
__ssh_agent_start
|
||||||
|
end
|
@ -1,4 +1,4 @@
|
|||||||
jorgebucaran/fisher
|
danhper/fish-ssh-agent
|
||||||
plttn/fish-eza
|
plttn/fish-eza
|
||||||
patrickf1/fzf.fish
|
patrickf1/fzf.fish
|
||||||
danhper/fish-ssh-agent
|
jorgebucaran/fisher
|
||||||
|
62
dot_config/fish/fish_variables
Normal file
62
dot_config/fish/fish_variables
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
# This file contains fish universal variable definitions.
|
||||||
|
# VERSION: 3.0
|
||||||
|
SETUVAR --export EZA_LAAD_OPTIONS:\x2d\x2dall\x1e\x2d\x2dall\x1e\x2d\x2dbinary\x1e\x2d\x2donly\x2ddirs
|
||||||
|
SETUVAR --export EZA_LAAID_OPTIONS:\x2d\x2dall\x1e\x2d\x2dall\x1e\x2d\x2dbinary\x1e\x2d\x2dicons\x1e\x2d\x2donly\x2ddirs
|
||||||
|
SETUVAR --export EZA_LAAI_OPTIONS:\x2d\x2dall\x1e\x2d\x2dall\x1e\x2d\x2dbinary\x1e\x2d\x2dicons
|
||||||
|
SETUVAR --export EZA_LAA_OPTIONS:\x2d\x2dall\x1e\x2d\x2dall\x1e\x2d\x2dbinary
|
||||||
|
SETUVAR --export EZA_LAD_OPTIONS:\x2d\x2dall\x1e\x2d\x2dbinary\x1e\x2d\x2donly\x2ddirs
|
||||||
|
SETUVAR --export EZA_LAID_OPTIONS:\x2d\x2dall\x1e\x2d\x2dbinary\x1e\x2d\x2dicons\x1e\x2d\x2donly\x2ddirs
|
||||||
|
SETUVAR --export EZA_LAI_OPTIONS:\x2d\x2dall\x1e\x2d\x2dbinary\x1e\x2d\x2dicons
|
||||||
|
SETUVAR --export EZA_LA_OPTIONS:\x2d\x2dall\x1e\x2d\x2dbinary
|
||||||
|
SETUVAR --export EZA_LC_OPTIONS:\x2d\x2dacross
|
||||||
|
SETUVAR --export EZA_LD_OPTIONS:\x2d\x2donly\x2ddirs
|
||||||
|
SETUVAR --export EZA_LE_OPTIONS:\x2d\x2dextended\x1e\x2d\x2dlong
|
||||||
|
SETUVAR --export EZA_LG_OPTIONS:\x2d\x2dgit\x1e\x2d\x2dgit\x2dignore\x1e\x2d\x2dlong
|
||||||
|
SETUVAR --export EZA_LID_OPTIONS:\x2d\x2dicons\x1e\x2d\x2donly\x2ddirs
|
||||||
|
SETUVAR --export EZA_LI_OPTIONS:\x2d\x2dicons
|
||||||
|
SETUVAR --export EZA_LL_OPTIONS:\x2d\x2dlong
|
||||||
|
SETUVAR --export EZA_LO_OPTIONS:\x2d\x2doneline
|
||||||
|
SETUVAR --export EZA_LT_OPTIONS:\x2d\x2dtree\x1e\x2d\x2dlevel
|
||||||
|
SETUVAR --export EZA_L_OPTIONS:\x1d
|
||||||
|
SETUVAR --export EZA_STANDARD_OPTIONS:\x2d\x2dgroup\x1e\x2d\x2dheader\x1e\x2d\x2dgroup\x2ddirectories\x2dfirst
|
||||||
|
SETUVAR --export __FISH_EZA_ALIASES:l\x1ela\x1eld\x1eli\x1elid\x1elaa\x1elad\x1elai\x1elaid\x1elaad\x1elaai\x1elaaid\x1ell\x1ella\x1elld\x1elli\x1ellid\x1ellaa\x1ellad\x1ellai\x1ellaid\x1ellaad\x1ellaai\x1ellaaid\x1elg\x1elga\x1elgd\x1elgi\x1elgid\x1elgaa\x1elgad\x1elgai\x1elgaid\x1elgaad\x1elgaai\x1elgaaid\x1ele\x1elea\x1eled\x1elei\x1eleid\x1eleaa\x1elead\x1eleai\x1eleaid\x1eleaad\x1eleaai\x1eleaaid\x1elt\x1elta\x1eltd\x1elti\x1eltid\x1eltad\x1eltai\x1eltaid\x1eltaad\x1eltaai\x1eltaaid\x1elc\x1elca\x1elcd\x1elci\x1elcid\x1elcaa\x1elcad\x1elcai\x1elcaid\x1elcaad\x1elcaai\x1elcaaid\x1elo\x1eloa\x1elod\x1eloi\x1eloid\x1eloaa\x1eload\x1eloai\x1eloaid\x1eloaad\x1eloaai\x1eloaaid
|
||||||
|
SETUVAR --export __FISH_EZA_BASE_ALIASES:l\x1ell\x1elg\x1ele\x1elt\x1elc\x1elo
|
||||||
|
SETUVAR --export __FISH_EZA_EXPANDED:a\x1ed\x1ei\x1eid\x1eaa\x1ead\x1eai\x1eaid\x1eaad\x1eaai\x1eaaid
|
||||||
|
SETUVAR --export __FISH_EZA_EXPANDED_OPT_NAME:LA\x1eLD\x1eLI\x1eLID\x1eLAA\x1eLAD\x1eLAI\x1eLAID\x1eLAAD\x1eLAAI\x1eLAAID
|
||||||
|
SETUVAR --export __FISH_EZA_OPT_NAMES:EZA_L_OPTIONS\x1eEZA_LA_OPTIONS\x1eEZA_LD_OPTIONS\x1eEZA_LI_OPTIONS\x1eEZA_LID_OPTIONS\x1eEZA_LAA_OPTIONS\x1eEZA_LAD_OPTIONS\x1eEZA_LAI_OPTIONS\x1eEZA_LAID_OPTIONS\x1eEZA_LAAD_OPTIONS\x1eEZA_LAAI_OPTIONS\x1eEZA_LAAID_OPTIONS\x1eEZA_LL_OPTIONS\x1eEZA_LG_OPTIONS\x1eEZA_LE_OPTIONS\x1eEZA_LT_OPTIONS\x1eEZA_LC_OPTIONS\x1eEZA_LO_OPTIONS
|
||||||
|
SETUVAR --export __FISH_EZA_SORT_OPTIONS:name\x1e\x2ename\x1esize\x1eext\x1emod\x1eold\x1eacc\x1ecr\x1einode
|
||||||
|
SETUVAR __fish_initialized:3400
|
||||||
|
SETUVAR _fisher_danhper_2F_fish_2D_ssh_2D_agent_files:\x7e/\x2econfig/fish/functions/__ssh_agent_is_started\x2efish\x1e\x7e/\x2econfig/fish/functions/__ssh_agent_start\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/fish\x2dssh\x2dagent\x2efish
|
||||||
|
SETUVAR _fisher_jorgebucaran_2F_fisher_files:\x7e/\x2econfig/fish/functions/fisher\x2efish\x1e\x7e/\x2econfig/fish/completions/fisher\x2efish
|
||||||
|
SETUVAR _fisher_patrickf1_2F_fzf_2E_fish_files:\x7e/\x2econfig/fish/functions/_fzf_configure_bindings_help\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_extract_var_info\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_preview_changed_file\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_preview_file\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_report_diff_type\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_report_file_type\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_directory\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_git_log\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_git_status\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_history\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_processes\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_variables\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_wrapper\x2efish\x1e\x7e/\x2econfig/fish/functions/fzf_configure_bindings\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/fzf\x2efish\x1e\x7e/\x2econfig/fish/completions/fzf_configure_bindings\x2efish
|
||||||
|
SETUVAR _fisher_plttn_2F_fish_2D_eza_files:\x7e/\x2econfig/fish/functions/eza_git\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/fish\x2deza\x2efish
|
||||||
|
SETUVAR _fisher_plugins:danhper/fish\x2dssh\x2dagent\x1eplttn/fish\x2deza\x1epatrickf1/fzf\x2efish\x1ejorgebucaran/fisher
|
||||||
|
SETUVAR _fisher_upgraded_to_4_4:\x1d
|
||||||
|
SETUVAR fish_color_autosuggestion:brblack
|
||||||
|
SETUVAR fish_color_cancel:\x2dr
|
||||||
|
SETUVAR fish_color_command:blue
|
||||||
|
SETUVAR fish_color_comment:red
|
||||||
|
SETUVAR fish_color_cwd:green
|
||||||
|
SETUVAR fish_color_cwd_root:red
|
||||||
|
SETUVAR fish_color_end:green
|
||||||
|
SETUVAR fish_color_error:brred
|
||||||
|
SETUVAR fish_color_escape:brcyan
|
||||||
|
SETUVAR fish_color_history_current:\x2d\x2dbold
|
||||||
|
SETUVAR fish_color_host:normal
|
||||||
|
SETUVAR fish_color_host_remote:yellow
|
||||||
|
SETUVAR fish_color_normal:normal
|
||||||
|
SETUVAR fish_color_operator:brcyan
|
||||||
|
SETUVAR fish_color_param:cyan
|
||||||
|
SETUVAR fish_color_quote:yellow
|
||||||
|
SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold
|
||||||
|
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
|
||||||
|
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
|
||||||
|
SETUVAR fish_color_status:red
|
||||||
|
SETUVAR fish_color_user:brgreen
|
||||||
|
SETUVAR fish_color_valid_path:\x2d\x2dunderline
|
||||||
|
SETUVAR fish_greeting:\x1d
|
||||||
|
SETUVAR fish_pager_color_completion:normal
|
||||||
|
SETUVAR fish_pager_color_description:yellow\x1e\x2di
|
||||||
|
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
||||||
|
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
||||||
|
SETUVAR fish_pager_color_selected_background:\x2dr
|
14
dot_config/fish/functions/__ssh_agent_is_started.fish
Normal file
14
dot_config/fish/functions/__ssh_agent_is_started.fish
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
function __ssh_agent_is_started -d "check if ssh agent is already started"
|
||||||
|
if begin; test -f $SSH_ENV; and test -z "$SSH_AGENT_PID"; end
|
||||||
|
source $SSH_ENV > /dev/null
|
||||||
|
end
|
||||||
|
|
||||||
|
if begin; test -z "$SSH_AGENT_PID"; and test -z "$SSH_CONNECTION"; end
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
ssh-add -l > /dev/null 2>&1
|
||||||
|
if test $status -eq 2
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
end
|
5
dot_config/fish/functions/__ssh_agent_start.fish
Normal file
5
dot_config/fish/functions/__ssh_agent_start.fish
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
function __ssh_agent_start -d "start a new ssh agent"
|
||||||
|
ssh-agent -c | sed 's/^echo/#echo/' > $SSH_ENV
|
||||||
|
chmod 600 $SSH_ENV
|
||||||
|
source $SSH_ENV > /dev/null
|
||||||
|
end
|
19
dot_config/fish/functions/br.fish
Normal file
19
dot_config/fish/functions/br.fish
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
# This script was automatically generated by the broot program
|
||||||
|
# More information can be found in https://github.com/Canop/broot
|
||||||
|
# This function starts broot and executes the command
|
||||||
|
# it produces, if any.
|
||||||
|
# It's needed because some shell commands, like `cd`,
|
||||||
|
# have no useful effect if executed in a subshell.
|
||||||
|
function br --wraps=broot
|
||||||
|
set -l cmd_file (mktemp)
|
||||||
|
if broot --outcmd $cmd_file $argv
|
||||||
|
read --local --null cmd < $cmd_file
|
||||||
|
rm -f $cmd_file
|
||||||
|
eval $cmd
|
||||||
|
else
|
||||||
|
set -l code $status
|
||||||
|
rm -f $cmd_file
|
||||||
|
return $code
|
||||||
|
end
|
||||||
|
end
|
@ -1,6 +1,6 @@
|
|||||||
function fisher --argument-names cmd --description "A plugin manager for Fish"
|
function fisher --argument-names cmd --description "A plugin manager for Fish"
|
||||||
set --query fisher_path || set --local fisher_path $__fish_config_dir
|
set --query fisher_path || set --local fisher_path $__fish_config_dir
|
||||||
set --local fisher_version 4.4.4
|
set --local fisher_version 4.4.5
|
||||||
set --local fish_plugins $__fish_config_dir/fish_plugins
|
set --local fish_plugins $__fish_config_dir/fish_plugins
|
||||||
|
|
||||||
switch "$cmd"
|
switch "$cmd"
|
||||||
@ -29,7 +29,7 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
|
|||||||
set --local old_plugins $_fisher_plugins
|
set --local old_plugins $_fisher_plugins
|
||||||
set --local new_plugins
|
set --local new_plugins
|
||||||
|
|
||||||
test -e $fish_plugins && set --local file_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins)
|
test -e $fish_plugins && set --local file_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins | string replace -- \~ ~)
|
||||||
|
|
||||||
if ! set --query argv[2]
|
if ! set --query argv[2]
|
||||||
if test "$cmd" != update
|
if test "$cmd" != update
|
||||||
@ -206,7 +206,7 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
|
|||||||
contains -- (string lower -- $plugin) (string lower -- $commit_plugins) || set --append commit_plugins $plugin
|
contains -- (string lower -- $plugin) (string lower -- $commit_plugins) || set --append commit_plugins $plugin
|
||||||
end
|
end
|
||||||
|
|
||||||
printf "%s\n" $commit_plugins >$fish_plugins
|
string replace --regex -- $HOME \~ $commit_plugins >$fish_plugins
|
||||||
else
|
else
|
||||||
set --erase _fisher_plugins
|
set --erase _fisher_plugins
|
||||||
command rm -f $fish_plugins
|
command rm -f $fish_plugins
|
||||||
|
0
dot_config/fish/themes/.keep
Normal file
0
dot_config/fish/themes/.keep
Normal file
2
dot_config/nvim/init.lua
Normal file
2
dot_config/nvim/init.lua
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
--- bootstrap lazy.nvim, LazyVim and your plugins
|
||||||
|
require("config.lazy")
|
@ -1,257 +0,0 @@
|
|||||||
{{- if eq .chezmoi.os "openbsd" }}
|
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
|
||||||
vim.fn.system({
|
|
||||||
"git",
|
|
||||||
"clone",
|
|
||||||
"--filter=blob:none",
|
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
|
||||||
"--branch=stable", -- latest stable release
|
|
||||||
lazypath,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
|
||||||
HOME = os.getenv("HOME")
|
|
||||||
|
|
||||||
vim.g.mapleader = ' '
|
|
||||||
vim.g.maplocalleader = '\\'
|
|
||||||
|
|
||||||
-- Plugins
|
|
||||||
require("lazy").setup("plugins")
|
|
||||||
|
|
||||||
-- Options
|
|
||||||
local o = vim.opt
|
|
||||||
|
|
||||||
-- basic settings
|
|
||||||
o.encoding = "utf-8"
|
|
||||||
o.backspace = "indent,eol,start" -- backspace works on every char in insert mode
|
|
||||||
o.completeopt = { 'menu', 'menuone', 'noselect' }
|
|
||||||
o.conceallevel = 2 -- Hide * markup for bold and italic, but not markers with substitutions
|
|
||||||
o.history = 1000
|
|
||||||
o.startofline = true
|
|
||||||
o.title = true
|
|
||||||
o.clipboard = 'unnamedplus'
|
|
||||||
o.mouse = "a" -- Enable mouse mode
|
|
||||||
|
|
||||||
-- Mapping waiting time
|
|
||||||
o.timeoutlen = 300
|
|
||||||
o.ttimeoutlen = 0
|
|
||||||
|
|
||||||
-- Spellchecker
|
|
||||||
o.spell = false
|
|
||||||
o.spelllang = { 'en_us' }
|
|
||||||
o.spellfile = HOME .. '/.vim/spell/en.utf8.add'
|
|
||||||
o.thesaurus = HOME .. '/.vim/thesaurus/english.txt'
|
|
||||||
|
|
||||||
-- Display
|
|
||||||
o.showmatch = true -- show matching brackets
|
|
||||||
o.colorcolumn = '90'
|
|
||||||
o.confirm = true -- Confirm to save changes before exiting modified buffer
|
|
||||||
o.cursorline = true
|
|
||||||
o.scrolloff = 4 -- always show 3 rows from edge of the screen
|
|
||||||
o.splitbelow = true
|
|
||||||
o.splitkeep = "screen"
|
|
||||||
o.splitright = true
|
|
||||||
o.virtualedit = 'block'
|
|
||||||
o.synmaxcol = 300 -- stop syntax highlight after x lines for performance
|
|
||||||
o.laststatus = 3 -- always show status line
|
|
||||||
o.list = false -- do not display white characters
|
|
||||||
o.termguicolors = true
|
|
||||||
o.wrap = false --do not wrap lines even if very long
|
|
||||||
o.eol = false -- show if there's no eol char
|
|
||||||
o.showbreak = '↪' -- character to show when line is broken
|
|
||||||
o.pumblend = 10 -- Popup blend
|
|
||||||
o.pumheight = 10 -- Maximum number of entries in a popup
|
|
||||||
|
|
||||||
-- Folding
|
|
||||||
-- o.foldenable = true
|
|
||||||
-- o.foldnestmax = 2
|
|
||||||
-- o.foldminlines = 10
|
|
||||||
-- o.foldmethod = "expr"
|
|
||||||
-- o.foldexpr = "nvim_treesitter#foldexpr()"
|
|
||||||
|
|
||||||
-- workaround for Telescope bug
|
|
||||||
vim.api.nvim_create_autocmd({ "BufEnter" }, {
|
|
||||||
pattern = { "*" },
|
|
||||||
command = "normal zx",
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Sidebar
|
|
||||||
o.number = true -- line number on the left
|
|
||||||
o.relativenumber = true
|
|
||||||
o.numberwidth = 3 -- always reserve 3 spaces for line number
|
|
||||||
o.signcolumn = 'yes'
|
|
||||||
o.modelines = 0
|
|
||||||
|
|
||||||
-- Bottombar
|
|
||||||
o.showcmd = true -- display command in bottom bar
|
|
||||||
o.ruler = false
|
|
||||||
o.showmode = false
|
|
||||||
|
|
||||||
-- Search
|
|
||||||
o.grepformat = "%f:%l:%c:%m"
|
|
||||||
o.grepprg = "rg --vimgrep"
|
|
||||||
o.incsearch = true -- starts searching as soon as typing, without enter needed
|
|
||||||
o.hlsearch = true -- highlighting of search matches
|
|
||||||
o.ignorecase = true -- ignore letter case when searching
|
|
||||||
o.smartcase = true -- case insentive unless capitals used in search
|
|
||||||
o.wildignorecase = true
|
|
||||||
|
|
||||||
o.inccommand = "nosplit" -- preview incremental substitute
|
|
||||||
o.matchtime = 2 -- delay before showing matching paren
|
|
||||||
o.mps = vim.o.mps .. ",<:>"
|
|
||||||
|
|
||||||
-- White characters
|
|
||||||
o.smartindent = true
|
|
||||||
o.breakindent = true
|
|
||||||
o.tabstop = 2
|
|
||||||
o.shiftwidth = 2 -- indentation rule
|
|
||||||
o.softtabstop = 2
|
|
||||||
o.expandtab = true -- expand tab to spaces
|
|
||||||
o.smarttab = true
|
|
||||||
o.shiftround = true -- Round indent
|
|
||||||
|
|
||||||
-- Shortmess
|
|
||||||
o.shortmess = o.shortmess
|
|
||||||
+ {
|
|
||||||
-- A = true, -- don't give the "ATTENTION" message when an existing swap file is found.
|
|
||||||
I = true, -- don't give the intro message when starting Vim |:intro|.
|
|
||||||
W = true, -- don't give "written" or "[w]" when writing a file
|
|
||||||
c = true, -- don't give |ins-completion-menu| messages
|
|
||||||
C = true, -- don't give |ins-completion-menu| messages
|
|
||||||
-- m = true, -- use "[+]" instead of "[Modified]"
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Format options
|
|
||||||
o.formatoptions = o.formatoptions
|
|
||||||
+ {
|
|
||||||
c = false,
|
|
||||||
o = false, -- O and o, don't continue comments
|
|
||||||
r = true, -- Pressing Enter will continue comments
|
|
||||||
}
|
|
||||||
|
|
||||||
o.fillchars = {
|
|
||||||
foldopen = "",
|
|
||||||
foldclose = "",
|
|
||||||
-- fold = "⸱",
|
|
||||||
fold = " ",
|
|
||||||
foldsep = " ",
|
|
||||||
diff = "╱",
|
|
||||||
eob = " ",
|
|
||||||
}
|
|
||||||
|
|
||||||
o.wildmode = "longest:full,full" -- Command-line completion mode
|
|
||||||
-- Backup files
|
|
||||||
o.hidden = true
|
|
||||||
o.autowrite = true
|
|
||||||
o.autoread = true
|
|
||||||
o.backup = true -- use backup files
|
|
||||||
o.writebackup = false
|
|
||||||
o.swapfile = false -- do not use swap file
|
|
||||||
o.undofile = true
|
|
||||||
o.undolevels = 10000
|
|
||||||
o.updatetime = 200 -- Save swap file and trigger CursorHold
|
|
||||||
o.undodir = HOME .. '/.local/share/nvim/dirs/undo//' -- undo files
|
|
||||||
o.backupdir = HOME .. '/.local/share/nvim/dirs/backup//' -- backups
|
|
||||||
|
|
||||||
-- Commands mode
|
|
||||||
o.wildmenu = true -- on TAB, complete options for system command
|
|
||||||
o.wildignore =
|
|
||||||
'deps,.svn,CVS,.git,.hg,*.o,*.a,*.class,*.mo,*.la,*.so,*.obj,*.swp,*.jpg,*.png,*.xpm,*.gif,.DS_Store,*.aux,*.out,*.toc'
|
|
||||||
|
|
||||||
vim.cmd([[
|
|
||||||
au BufRead,BufNewFile *.md set tw=80 syntax=markdown
|
|
||||||
]])
|
|
||||||
|
|
||||||
vim.g.markdown_recommended_style = 0
|
|
||||||
vim.api.nvim_create_user_command('ReloadConfig', 'source $MYVIMRC', {})
|
|
||||||
|
|
||||||
local group = vim.api.nvim_create_augroup('user_cmds', { clear = true })
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
|
||||||
desc = 'Highlight on yank',
|
|
||||||
group = group,
|
|
||||||
callback = function()
|
|
||||||
vim.highlight.on_yank({ higroup = 'Visual', timeout = 200 })
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
local map = vim.keymap.set
|
|
||||||
|
|
||||||
map({ 'n', 'v' }, '<Space>', "<Nop>", { silent = true })
|
|
||||||
|
|
||||||
-- Clear search with <esc>
|
|
||||||
map({ "i", "n" }, "<esc>", "<cmd>noh<cr><esc>", { desc = "Escape and clear hlsearch" })
|
|
||||||
|
|
||||||
-- sane regexes
|
|
||||||
map({ 'n', 'v' }, '/', '/\\v', { noremap = true, silent = true })
|
|
||||||
|
|
||||||
-- don't jump when using *
|
|
||||||
map('n', '*', '*<c-o>')
|
|
||||||
|
|
||||||
-- https://github.com/mhinz/vim-galore#saner-behavior-of-n-and-n
|
|
||||||
map("n", "n", "'Nn'[v:searchforward].'zv'", { expr = true, desc = "Next search result" })
|
|
||||||
map("x", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
|
|
||||||
map("o", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
|
|
||||||
map("n", "N", "'nN'[v:searchforward].'zv'", { expr = true, desc = "Prev search result" })
|
|
||||||
map("x", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev search result" })
|
|
||||||
map("o", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev search result" })
|
|
||||||
|
|
||||||
-- Same when jumping around
|
|
||||||
map('n', 'g;', 'g;zz')
|
|
||||||
|
|
||||||
-- replace ex mode map and use it for repeating 'q' macro
|
|
||||||
map('n', 'Q', '@q')
|
|
||||||
map('v', 'Q', '<cmd>norm @q<CR>')
|
|
||||||
|
|
||||||
-- save file
|
|
||||||
map({ "i", "x", "n", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save file" })
|
|
||||||
map({ "i", "n" }, "<C-s><C-s>", "<cmd>silent! xa<cr><cmd>qa<cr>", { desc = "Save all and quit" })
|
|
||||||
|
|
||||||
-- better indenting
|
|
||||||
map("v", "<", "<gv")
|
|
||||||
map("v", ">", ">gv")
|
|
||||||
|
|
||||||
-- lazy
|
|
||||||
map("n", "<leader>l", "<cmd>Lazy<cr>", { desc = "Lazy" })
|
|
||||||
|
|
||||||
map("n", "<leader>xl", "<cmd>lopen<cr>", { desc = "Location List" })
|
|
||||||
map("n", "<leader>xq", "<cmd>copen<cr>", { desc = "Quickfix List" })
|
|
||||||
|
|
||||||
map("n", "[q", vim.cmd.cprev, { desc = "Previous quickfix" })
|
|
||||||
map("n", "]q", vim.cmd.cnext, { desc = "Next quickfix" })
|
|
||||||
|
|
||||||
-- Shortcut to close quickfix windows
|
|
||||||
map('n', '<leader>a', '<cmd>windo lcl|ccl<CR>')
|
|
||||||
|
|
||||||
-- <Leader>q Closes the current buffer
|
|
||||||
map('n', '<leader>q', '<cmd>bdelete<CR>')
|
|
||||||
|
|
||||||
-- Easier in-file navigation with Tab and S-Tab
|
|
||||||
map('n', '<S-Tab>', '<C-U>')
|
|
||||||
map('n', '<Tab>', '<C-D>')
|
|
||||||
map("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" })
|
|
||||||
|
|
||||||
-- Easy buffer navigation
|
|
||||||
map('n', '<C-h>', '<C-w>h')
|
|
||||||
map('n', '<C-j>', '<C-w>j')
|
|
||||||
map('n', '<C-k>', '<C-w>k')
|
|
||||||
map('n', '<C-l>', '<C-w>l')
|
|
||||||
map("n", "[b", "<cmd>bprevious<cr>", { desc = "Prev buffer" })
|
|
||||||
map("n", "]b", "<cmd>bnext<cr>", { desc = "Next buffer" })
|
|
||||||
map("n", "<leader>bb", "<cmd>e #<cr>", { desc = "Switch to Other Buffer" })
|
|
||||||
|
|
||||||
map('n', '<up>', '<cmd>resize -2<CR>')
|
|
||||||
map('n', '<down>', '<cmd>resize +2<CR>')
|
|
||||||
map('n', '<left>', '<cmd>vertical resize -2<CR>')
|
|
||||||
map('n', '<right>', '<cmd>vertical resize +2<CR>')
|
|
||||||
|
|
||||||
-- windows
|
|
||||||
map("n", "<leader>ww", "<C-W>p", { desc = "Other window", remap = true })
|
|
||||||
map("n", "<leader>wd", "<C-W>c", { desc = "Delete window", remap = true })
|
|
||||||
map("n", "<leader>-", "<C-W>s", { desc = "Split window below", remap = true })
|
|
||||||
map("n", "<leader>|", "<C-W>v", { desc = "Split window right", remap = true })
|
|
||||||
{{ else }}
|
|
||||||
require("config.lazy")
|
|
||||||
{{ end }}
|
|
58
dot_config/nvim/lazy-lock.json
Normal file
58
dot_config/nvim/lazy-lock.json
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
"LazyVim": { "branch": "main", "commit": "adcbfc72fd8d0808d78bdfe0940d98c6432c4ef0" },
|
||||||
|
"bufferline.nvim": { "branch": "main", "commit": "5cc447cb2b463cb499c82eaeabbed4f5fa6a0a44" },
|
||||||
|
"calendar-vim": { "branch": "master", "commit": "a7e73e02c92566bf427b2a1d6a61a8f23542cc21" },
|
||||||
|
"catppuccin": { "branch": "main", "commit": "637d99e638bc6f1efedac582f6ccab08badac0c6" },
|
||||||
|
"clangd_extensions.nvim": { "branch": "main", "commit": "8f7b72100883e0e34400d9518d40a03f21e4d0a6" },
|
||||||
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
|
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||||
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
|
"conform.nvim": { "branch": "master", "commit": "62d5accad8b29d6ba9b58d3dff90c43a55621c60" },
|
||||||
|
"crates.nvim": { "branch": "main", "commit": "8bf8358ee326d5d8c11dcd7ac0bcc9ff97dbc785" },
|
||||||
|
"dashboard-nvim": { "branch": "master", "commit": "ae309606940d26d8c9df8b048a6e136b6bbec478" },
|
||||||
|
"dressing.nvim": { "branch": "master", "commit": "fc78a3ca96f4db9f8893bb7e2fd9823e0780451b" },
|
||||||
|
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
|
||||||
|
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" },
|
||||||
|
"grug-far.nvim": { "branch": "main", "commit": "9a2f78219390b47d67795ab09390d7f092e23976" },
|
||||||
|
"indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" },
|
||||||
|
"lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" },
|
||||||
|
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
|
||||||
|
"luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" },
|
||||||
|
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||||
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "43894adcf10bb1190c2184bd7c1750e8ea2b3dce" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||||
|
"mini.ai": { "branch": "main", "commit": "31c149067d38b97720d2a179619f7745a0006ecc" },
|
||||||
|
"mini.icons": { "branch": "main", "commit": "54686be7d58807906cb2c8c2216e0bf9c044f19a" },
|
||||||
|
"mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" },
|
||||||
|
"neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" },
|
||||||
|
"noice.nvim": { "branch": "main", "commit": "9ccd02965382922c33762933c5601318f93e19fb" },
|
||||||
|
"nord.nvim": { "branch": "master", "commit": "80c1e5321505aeb22b7a9f23eb82f1e193c12470" },
|
||||||
|
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
|
||||||
|
"nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" },
|
||||||
|
"nvim-cmp": { "branch": "main", "commit": "be7bd4c5f860c79da97af3a26d489af50babfd4b" },
|
||||||
|
"nvim-colorizer.lua": { "branch": "master", "commit": "6059927ee649f02fcc819efc213ea78ee9eb2a7d" },
|
||||||
|
"nvim-lint": { "branch": "master", "commit": "6b46370d02cd001509a765591a3ffc481b538794" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "c646154d6e4db9b2979eeb517d0b817ad00c9c47" },
|
||||||
|
"nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" },
|
||||||
|
"nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "efb2e9c607cab1e4f7171493b7c6f63bd39073fc" },
|
||||||
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" },
|
||||||
|
"nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
|
||||||
|
"oil.nvim": { "branch": "master", "commit": "99ce32f4a2ecf76263b72fcc31efb163faa1a941" },
|
||||||
|
"persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||||
|
"render-markdown.nvim": { "branch": "main", "commit": "e1879e0ea3d5cee295b48335fc90e76ae8a63081" },
|
||||||
|
"rustaceanvim": { "branch": "master", "commit": "6e742b9fc6a37e46181879f6c32cecfa8cd2cebf" },
|
||||||
|
"snacks.nvim": { "branch": "main", "commit": "f99aa0c46493c365f01aaacb4f34c98c8ad3bed2" },
|
||||||
|
"telekasten.nvim": { "branch": "main", "commit": "6a10a7929421d6e696e46bbc5aa5627a8cbcf61d" },
|
||||||
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "85922dde3767e01d42a08e750a773effbffaea3e" },
|
||||||
|
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
||||||
|
"tokyonight.nvim": { "branch": "main", "commit": "c2725eb6d086c8c9624456d734bd365194660017" },
|
||||||
|
"trouble.nvim": { "branch": "main", "commit": "3dc00c0447c016cd43e03054c3d49436a1f2076d" },
|
||||||
|
"ts-comments.nvim": { "branch": "main", "commit": "2002692ad1d3f6518d016550c20c2a890f0cbf0e" },
|
||||||
|
"vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "68e37e12913a66b60073906f5d3f14dee0de19f2" }
|
||||||
|
}
|
13
dot_config/nvim/lazyvim.json
Normal file
13
dot_config/nvim/lazyvim.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"extras": [
|
||||||
|
"lazyvim.plugins.extras.lang.clangd",
|
||||||
|
"lazyvim.plugins.extras.lang.go",
|
||||||
|
"lazyvim.plugins.extras.lang.markdown",
|
||||||
|
"lazyvim.plugins.extras.lang.rust",
|
||||||
|
"lazyvim.plugins.extras.ui.dashboard-nvim"
|
||||||
|
],
|
||||||
|
"news": {
|
||||||
|
"NEWS.md": "7429"
|
||||||
|
},
|
||||||
|
"version": 7
|
||||||
|
}
|
@ -1,14 +1,6 @@
|
|||||||
-- Autocmds are automatically loaded on the VeryLazy event
|
-- Autocmds are automatically loaded on the VeryLazy event
|
||||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||||
-- Add any additional autocmds here
|
-- Add any additional autocmds here
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
|
||||||
pattern = { "norg" },
|
|
||||||
callback = function()
|
|
||||||
vim.opt_local.wrap = true
|
|
||||||
vim.opt_local.spell = true
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = { "markdown" },
|
pattern = { "markdown" },
|
||||||
callback = function()
|
callback = function()
|
||||||
|
@ -1,16 +1,23 @@
|
|||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
-- bootstrap lazy.nvim
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||||
-- stylua: ignore
|
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
if vim.v.shell_error ~= 0 then
|
||||||
|
vim.api.nvim_echo({
|
||||||
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
|
{ out, "WarningMsg" },
|
||||||
|
{ "\nPress any key to exit..." },
|
||||||
|
}, true, {})
|
||||||
|
vim.fn.getchar()
|
||||||
|
os.exit(1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
-- add LazyVim and import its plugins
|
-- add LazyVim and import its plugins
|
||||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
-- import any extras modules here
|
|
||||||
-- import/override with your plugins
|
-- import/override with your plugins
|
||||||
{ import = "plugins" },
|
{ import = "plugins" },
|
||||||
},
|
},
|
||||||
@ -24,7 +31,10 @@ require("lazy").setup({
|
|||||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||||
},
|
},
|
||||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||||
checker = { enabled = true, notify = false, frequency = 259200 }, -- automatically check for plugin updates
|
checker = {
|
||||||
|
enabled = true, -- check for plugin updates periodically
|
||||||
|
notify = false, -- notify on update
|
||||||
|
}, -- automatically check for plugin updates
|
||||||
performance = {
|
performance = {
|
||||||
rtp = {
|
rtp = {
|
||||||
-- disable some rtp plugins
|
-- disable some rtp plugins
|
||||||
|
@ -1,21 +1,3 @@
|
|||||||
-- Options are automatically loaded before lazy.nvim startup
|
-- Options are automatically loaded before lazy.nvim startup
|
||||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||||
-- Add any additional options here
|
-- Add any additional options here
|
||||||
|
|
||||||
if vim.g.neovide then
|
|
||||||
vim.g.neovide_cursor_animation_length = 0
|
|
||||||
vim.o.guifont = "BrutalistMono Nerd Font Regular:h16"
|
|
||||||
vim.g.neovide_theme = "dark"
|
|
||||||
vim.keymap.set("n", "<D-s>", ":w<CR>") -- Save
|
|
||||||
vim.keymap.set("v", "<D-c>", '"+y') -- Copy
|
|
||||||
vim.keymap.set("n", "<D-v>", '"+P') -- Paste normal mode
|
|
||||||
vim.keymap.set("v", "<D-v>", '"+P') -- Paste visual mode
|
|
||||||
vim.keymap.set("c", "<D-v>", "<C-R>+") -- Paste command mode
|
|
||||||
vim.keymap.set("i", "<D-v>", '<ESC>l"+Pli') -- Paste insert mode
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Allow clipboard copy paste in neovim
|
|
||||||
vim.api.nvim_set_keymap("", "<D-v>", "+p<CR>", { noremap = true, silent = true })
|
|
||||||
vim.api.nvim_set_keymap("!", "<D-v>", "<C-R>+", { noremap = true, silent = true })
|
|
||||||
vim.api.nvim_set_keymap("t", "<D-v>", "<C-R>+", { noremap = true, silent = true })
|
|
||||||
vim.api.nvim_set_keymap("v", "<D-v>", "<C-R>+", { noremap = true, silent = true })
|
|
||||||
|
19
dot_config/nvim/lua/plugins/coding.lua
Normal file
19
dot_config/nvim/lua/plugins/coding.lua
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
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({
|
||||||
|
-- Configuration here, or leave empty to use defaults
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"windwp/nvim-autopairs",
|
||||||
|
event = "InsertEnter",
|
||||||
|
opts = {
|
||||||
|
fast_wrap = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
@ -1,160 +0,0 @@
|
|||||||
return {
|
|
||||||
{{- if eq .chezmoi.os "openbsd" }}
|
|
||||||
-- snippets
|
|
||||||
{
|
|
||||||
"L3MON4D3/LuaSnip",
|
|
||||||
build = "gmake install_jsregexp",
|
|
||||||
dependencies = {
|
|
||||||
"rafamadriz/friendly-snippets",
|
|
||||||
config = function()
|
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
|
||||||
require("luasnip.loaders.from_snipmate").lazy_load()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
history = true,
|
|
||||||
delete_check_events = "TextChanged",
|
|
||||||
},
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<tab>",
|
|
||||||
function()
|
|
||||||
return require("luasnip").jumpable(1) and "<Plug>luasnip-jump-next" or "<tab>"
|
|
||||||
end,
|
|
||||||
expr = true,
|
|
||||||
silent = true,
|
|
||||||
mode = "i",
|
|
||||||
},
|
|
||||||
{ "<tab>", function() require("luasnip").jump(1) end, mode = "s" },
|
|
||||||
{ "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" } },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- auto completion
|
|
||||||
{
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
version = false, -- last release is way too old
|
|
||||||
event = "InsertEnter",
|
|
||||||
dependencies = {
|
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
|
||||||
"hrsh7th/cmp-buffer",
|
|
||||||
"hrsh7th/cmp-path",
|
|
||||||
"saadparwaiz1/cmp_luasnip",
|
|
||||||
},
|
|
||||||
opts = function()
|
|
||||||
vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true })
|
|
||||||
local kind_icons = {
|
|
||||||
Text = " ",
|
|
||||||
Method = " ",
|
|
||||||
Function = " ",
|
|
||||||
Constructor = " ",
|
|
||||||
Field = " ",
|
|
||||||
Variable = " ",
|
|
||||||
Class = " ",
|
|
||||||
Interface = " ",
|
|
||||||
Module = " ",
|
|
||||||
Property = " ",
|
|
||||||
Unit = "",
|
|
||||||
Value = " ",
|
|
||||||
Enum = " ",
|
|
||||||
Keyword = " ",
|
|
||||||
Snippet = " ",
|
|
||||||
Color = " ",
|
|
||||||
File = " ",
|
|
||||||
Reference = " ",
|
|
||||||
Folder = " ",
|
|
||||||
EnumMember = " ",
|
|
||||||
Constant = " ",
|
|
||||||
Struct = " ",
|
|
||||||
Event = " ",
|
|
||||||
Operator = " ",
|
|
||||||
TypeParameter = "",
|
|
||||||
}
|
|
||||||
|
|
||||||
local luasnip = require('luasnip')
|
|
||||||
local cmp = require("cmp")
|
|
||||||
local defaults = require("cmp.config.default")()
|
|
||||||
return {
|
|
||||||
completion = {
|
|
||||||
completeopt = "menu,menuone,noinsert",
|
|
||||||
},
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
luasnip.lsp_expand(args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
|
||||||
["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
|
||||||
["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
|
||||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
|
||||||
["<C-e>"] = cmp.mapping.abort(),
|
|
||||||
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
|
||||||
["<S-CR>"] = cmp.mapping.confirm({
|
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
|
||||||
select = true,
|
|
||||||
}), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
|
||||||
["<C-CR>"] = function(fallback)
|
|
||||||
cmp.abort()
|
|
||||||
fallback()
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = "nvim_lsp", keyword_length = 1 },
|
|
||||||
{ name = "luasnip", keyword_length = 2 },
|
|
||||||
{ name = "path" },
|
|
||||||
}, {
|
|
||||||
{ name = "buffer", keyword_length = 3 },
|
|
||||||
}),
|
|
||||||
formatting = {
|
|
||||||
format = function(entry, vim_item)
|
|
||||||
-- Kind icons
|
|
||||||
vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind) -- This concatenates the icons with the name of the item kind
|
|
||||||
-- Source
|
|
||||||
vim_item.menu = ({
|
|
||||||
buffer = "[Buffer]",
|
|
||||||
nvim_lsp = "[LSP]",
|
|
||||||
luasnip = "[LuaSnip]",
|
|
||||||
nvim_lua = "[Lua]",
|
|
||||||
latex_symbols = "[LaTeX]",
|
|
||||||
})[entry.source.name]
|
|
||||||
return vim_item
|
|
||||||
end
|
|
||||||
},
|
|
||||||
experimental = {
|
|
||||||
ghost_text = {
|
|
||||||
hl_group = "CmpGhostText",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
sorting = defaults.sorting,
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
config = function(_, opts)
|
|
||||||
for _, source in ipairs(opts.sources) do
|
|
||||||
source.group_index = source.group_index or 1
|
|
||||||
end
|
|
||||||
require("cmp").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"kylechui/nvim-surround",
|
|
||||||
version = "*", -- Use for stability; omit to use `main` branch for the latest features
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function()
|
|
||||||
require("nvim-surround").setup({
|
|
||||||
-- Configuration here, or leave empty to use defaults
|
|
||||||
})
|
|
||||||
end
|
|
||||||
},
|
|
||||||
{{ end }}
|
|
||||||
{
|
|
||||||
"windwp/nvim-autopairs",
|
|
||||||
event = "InsertEnter",
|
|
||||||
opts = {
|
|
||||||
fast_wrap = {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
13
dot_config/nvim/lua/plugins/colorscheme.lua
Normal file
13
dot_config/nvim/lua/plugins/colorscheme.lua
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"shaunsingh/nord.nvim",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"LazyVim/LazyVim",
|
||||||
|
opts = {
|
||||||
|
colorscheme = "nord",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
@ -1,51 +0,0 @@
|
|||||||
return {
|
|
||||||
-- gruvbox
|
|
||||||
{
|
|
||||||
"ellisonleao/gruvbox.nvim",
|
|
||||||
lazy = true,
|
|
||||||
opts = { contrast = "hard" },
|
|
||||||
},
|
|
||||||
-- kanagawa
|
|
||||||
{
|
|
||||||
"rebelot/kanagawa.nvim",
|
|
||||||
lazy = true,
|
|
||||||
},
|
|
||||||
{{- if eq .chezmoi.os "openbsd" }}
|
|
||||||
{
|
|
||||||
"gbprod/nord.nvim",
|
|
||||||
lazy = false,
|
|
||||||
priority = 1000,
|
|
||||||
opts = {
|
|
||||||
styles = {
|
|
||||||
comments = { italic = true },
|
|
||||||
keywords = { bold = true },
|
|
||||||
functions = { bold = true },
|
|
||||||
variables = {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
vim.cmd([[colorscheme nord]])
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{{- else }}
|
|
||||||
{
|
|
||||||
"gbprod/nord.nvim",
|
|
||||||
lazy = false,
|
|
||||||
priority = 1000,
|
|
||||||
opts = {
|
|
||||||
styles = {
|
|
||||||
comments = { italic = true },
|
|
||||||
keywords = { bold = true },
|
|
||||||
functions = { bold = true },
|
|
||||||
variables = {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"LazyVim/LazyVim",
|
|
||||||
opts = {
|
|
||||||
colorscheme = "nord",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{{- end }}
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
return {
|
|
||||||
{ "folke/lazy.nvim", version = false },
|
|
||||||
{ "LazyVim/LazyVim", version = false },
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
return {
|
|
||||||
{ "echasnovski/mini.pairs", enabled = false },
|
|
||||||
{ "nvim-neo-tree/neo-tree.nvim", enabled = false },
|
|
||||||
{ "akinsho/bufferline.nvim", enabled = false },
|
|
||||||
}
|
|
10
dot_config/nvim/lua/plugins/disabled.lua.tmpl
Normal file
10
dot_config/nvim/lua/plugins/disabled.lua.tmpl
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
return {
|
||||||
|
{ "echasnovski/mini.pairs", enabled = false },
|
||||||
|
{ "nvim-neo-tree/neo-tree.nvim", enabled = false },
|
||||||
|
{ "akinsho/bufferline.nvim", enabled = false },
|
||||||
|
{{- if eq .chezmoi.os "openbsd" }}
|
||||||
|
{ "lukas-reineke/indent-blankline.nvim", enabled = false },
|
||||||
|
{ "williamboman/mason-lspconfig.nvim", enabled = false },
|
||||||
|
{ "williamboman/mason.nvim", enabled = false },
|
||||||
|
{{- end }}
|
||||||
|
}
|
@ -1,264 +0,0 @@
|
|||||||
return {
|
|
||||||
-- Fuzzy finder.
|
|
||||||
{
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
cmd = "Telescope",
|
|
||||||
version = false, -- telescope did only one release, so use HEAD for now
|
|
||||||
dependencies = {
|
|
||||||
"nvim-telescope/telescope-fzf-native.nvim",
|
|
||||||
build = "gmake",
|
|
||||||
config = function()
|
|
||||||
require("telescope").load_extension("fzf")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ "<leader><space>", "<cmd>Telescope find_files<cr>", desc = "Find Files" },
|
|
||||||
{ "<leader>,", "<cmd>Telescope buffers show_all_buffers=true<cr>", desc = "Switch Buffer" },
|
|
||||||
{ "<leader>/", "<cmd>Telescope live_grep<cr>", desc = "Switch Buffer" },
|
|
||||||
{ "<leader>sh", "<cmd>Telescope help_tags<cr>", desc = "Search help tags" },
|
|
||||||
{ "<leader>sk", "<cmd>Telescope keymaps<cr>", desc = "Key Maps" },
|
|
||||||
{ "z=", "<cmd>Telescope spell_suggest<cr>", desc = "Spell options" },
|
|
||||||
{ "<leader>ss", "<cmd>Telescope lsp_document_symbols<cr>", desc = "Goto Symbol" },
|
|
||||||
},
|
|
||||||
opts = function()
|
|
||||||
local actions = require("telescope.actions")
|
|
||||||
|
|
||||||
local open_with_trouble = function(...)
|
|
||||||
return require("trouble.providers.telescope").open_with_trouble(...)
|
|
||||||
end
|
|
||||||
local open_selected_with_trouble = function(...)
|
|
||||||
return require("trouble.providers.telescope").open_selected_with_trouble(...)
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
defaults = {
|
|
||||||
prompt_prefix = " ",
|
|
||||||
selection_caret = " ",
|
|
||||||
layout_config = { horizontal = { preview_width = 0.5 } },
|
|
||||||
file_ignore_patterns = { 'node_modules/.*' },
|
|
||||||
extensions = {
|
|
||||||
fzf = {
|
|
||||||
fuzzy = true, -- false will only do exact matching
|
|
||||||
override_generic_sorter = true, -- override the generic sorter
|
|
||||||
override_file_sorter = true, -- override the file sorter
|
|
||||||
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mappings = {
|
|
||||||
i = {
|
|
||||||
["<c-t>"] = open_with_trouble,
|
|
||||||
["<a-t>"] = open_selected_with_trouble,
|
|
||||||
["<C-Down>"] = actions.cycle_history_next,
|
|
||||||
["<C-Up>"] = actions.cycle_history_prev,
|
|
||||||
["<C-f>"] = actions.preview_scrolling_down,
|
|
||||||
["<C-b>"] = actions.preview_scrolling_up,
|
|
||||||
},
|
|
||||||
n = {
|
|
||||||
["q"] = actions.close,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-telescope/telescope-bibtex.nvim",
|
|
||||||
config = function()
|
|
||||||
require "telescope".load_extension("bibtex")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'numToStr/Comment.nvim',
|
|
||||||
opts = {
|
|
||||||
-- add any options here
|
|
||||||
},
|
|
||||||
lazy = false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"windwp/nvim-autopairs",
|
|
||||||
event = "InsertEnter",
|
|
||||||
opts = {
|
|
||||||
fast_wrap = {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- which-key helps you remember key bindings by showing a popup
|
|
||||||
-- with the active keybindings of the command you started typing.
|
|
||||||
{
|
|
||||||
"folke/which-key.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
opts = {
|
|
||||||
plugins = { spelling = true },
|
|
||||||
defaults = {
|
|
||||||
mode = { "n", "v" },
|
|
||||||
["g"] = { name = "+goto" },
|
|
||||||
["gs"] = { name = "+surround" },
|
|
||||||
["]"] = { name = "+next" },
|
|
||||||
["["] = { name = "+prev" },
|
|
||||||
["<leader><tab>"] = { name = "+tabs" },
|
|
||||||
["<leader>b"] = { name = "+buffer" },
|
|
||||||
["<leader>c"] = { name = "+code" },
|
|
||||||
["<leader>f"] = { name = "+file/find" },
|
|
||||||
["<leader>g"] = { name = "+git" },
|
|
||||||
["<leader>gh"] = { name = "+hunks" },
|
|
||||||
["<leader>q"] = { name = "+quit/session" },
|
|
||||||
["<leader>s"] = { name = "+search" },
|
|
||||||
["<leader>u"] = { name = "+ui" },
|
|
||||||
["<leader>w"] = { name = "+windows" },
|
|
||||||
["<leader>x"] = { name = "+diagnostics/quickfix" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
local wk = require("which-key")
|
|
||||||
wk.setup(opts)
|
|
||||||
wk.register(opts.defaults)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- git signs highlights text that has changed since the list
|
|
||||||
-- git commit, and also lets you interactively stage & unstage
|
|
||||||
-- hunks in a commit.
|
|
||||||
{
|
|
||||||
"lewis6991/gitsigns.nvim",
|
|
||||||
opts = {
|
|
||||||
signs = {
|
|
||||||
add = { text = "▎" },
|
|
||||||
change = { text = "▎" },
|
|
||||||
delete = { text = "" },
|
|
||||||
topdelete = { text = "" },
|
|
||||||
changedelete = { text = "▎" },
|
|
||||||
untracked = { text = "▎" },
|
|
||||||
},
|
|
||||||
on_attach = function(buffer)
|
|
||||||
local gs = package.loaded.gitsigns
|
|
||||||
|
|
||||||
local function map(mode, l, r, desc)
|
|
||||||
vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc })
|
|
||||||
end
|
|
||||||
|
|
||||||
-- stylua: ignore start
|
|
||||||
map("n", "]h", gs.next_hunk, "Next Hunk")
|
|
||||||
map("n", "[h", gs.prev_hunk, "Prev Hunk")
|
|
||||||
map({ "n", "v" }, "<leader>ghs", ":Gitsigns stage_hunk<CR>", "Stage Hunk")
|
|
||||||
map({ "n", "v" }, "<leader>ghr", ":Gitsigns reset_hunk<CR>", "Reset Hunk")
|
|
||||||
map("n", "<leader>ghS", gs.stage_buffer, "Stage Buffer")
|
|
||||||
map("n", "<leader>ghu", gs.undo_stage_hunk, "Undo Stage Hunk")
|
|
||||||
map("n", "<leader>ghR", gs.reset_buffer, "Reset Buffer")
|
|
||||||
map("n", "<leader>ghp", gs.preview_hunk, "Preview Hunk")
|
|
||||||
map("n", "<leader>ghb", function() gs.blame_line({ full = true }) end, "Blame Line")
|
|
||||||
map("n", "<leader>ghd", gs.diffthis, "Diff This")
|
|
||||||
map("n", "<leader>ghD", function() gs.diffthis("~") end, "Diff This ~")
|
|
||||||
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", "GitSigns Select Hunk")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Automatically highlights other instances of the word under your cursor.
|
|
||||||
-- This works with LSP, Treesitter, and regexp matching to find the other
|
|
||||||
-- instances.
|
|
||||||
{
|
|
||||||
"RRethy/vim-illuminate",
|
|
||||||
opts = {
|
|
||||||
delay = 200,
|
|
||||||
large_file_cutoff = 2000,
|
|
||||||
large_file_overrides = {
|
|
||||||
providers = { "lsp" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
require("illuminate").configure(opts)
|
|
||||||
|
|
||||||
local function map(key, dir, buffer)
|
|
||||||
vim.keymap.set("n", key, function()
|
|
||||||
require("illuminate")["goto_" .. dir .. "_reference"](false)
|
|
||||||
end, { desc = dir:sub(1, 1):upper() .. dir:sub(2) .. " Reference", buffer = buffer })
|
|
||||||
end
|
|
||||||
|
|
||||||
map("]]", "next")
|
|
||||||
map("[[", "prev")
|
|
||||||
|
|
||||||
-- also set it after loading ftplugins, since a lot overwrite [[ and ]]
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
|
||||||
callback = function()
|
|
||||||
local buffer = vim.api.nvim_get_current_buf()
|
|
||||||
map("]]", "next", buffer)
|
|
||||||
map("[[", "prev", buffer)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
keys = {
|
|
||||||
{ "]]", desc = "Next Reference" },
|
|
||||||
{ "[[", desc = "Prev Reference" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- better diagnostics list and others
|
|
||||||
{
|
|
||||||
"folke/trouble.nvim",
|
|
||||||
cmd = { "TroubleToggle", "Trouble" },
|
|
||||||
opts = { use_diagnostic_signs = true },
|
|
||||||
keys = {
|
|
||||||
{ "<leader>xx", "<cmd>TroubleToggle document_diagnostics<cr>", desc = "Document Diagnostics (Trouble)" },
|
|
||||||
{ "<leader>xX", "<cmd>TroubleToggle workspace_diagnostics<cr>", desc = "Workspace Diagnostics (Trouble)" },
|
|
||||||
{ "<leader>xL", "<cmd>TroubleToggle loclist<cr>", desc = "Location List (Trouble)" },
|
|
||||||
{ "<leader>xQ", "<cmd>TroubleToggle quickfix<cr>", desc = "Quickfix List (Trouble)" },
|
|
||||||
{
|
|
||||||
"[q",
|
|
||||||
function()
|
|
||||||
if require("trouble").is_open() then
|
|
||||||
require("trouble").previous({ skip_groups = true, jump = true })
|
|
||||||
else
|
|
||||||
local ok, err = pcall(vim.cmd.cprev)
|
|
||||||
if not ok then
|
|
||||||
vim.notify(err, vim.log.levels.ERROR)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
desc = "Previous trouble/quickfix item",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"]q",
|
|
||||||
function()
|
|
||||||
if require("trouble").is_open() then
|
|
||||||
require("trouble").next({ skip_groups = true, jump = true })
|
|
||||||
else
|
|
||||||
local ok, err = pcall(vim.cmd.cnext)
|
|
||||||
if not ok then
|
|
||||||
vim.notify(err, vim.log.levels.ERROR)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
desc = "Next trouble/quickfix item",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Finds and lists all of the TODO, HACK, BUG, etc comment
|
|
||||||
-- in your project and loads them into a browsable list.
|
|
||||||
{
|
|
||||||
"folke/todo-comments.nvim",
|
|
||||||
cmd = { "TodoTrouble", "TodoTelescope" },
|
|
||||||
config = true,
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
|
||||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
|
||||||
{ "<leader>xt", "<cmd>TodoTrouble<cr>", desc = "Todo (Trouble)" },
|
|
||||||
{ "<leader>xT", "<cmd>TodoTrouble keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme (Trouble)" },
|
|
||||||
{ "<leader>st", "<cmd>TodoTelescope<cr>", desc = "Todo" },
|
|
||||||
{ "<leader>sT", "<cmd>TodoTelescope keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/flash.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
opts = {},
|
|
||||||
keys = {
|
|
||||||
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
|
||||||
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
|
||||||
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
|
||||||
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
|
||||||
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,45 +0,0 @@
|
|||||||
return {
|
|
||||||
"stevearc/conform.nvim",
|
|
||||||
event = { "BufWritePre" },
|
|
||||||
cmd = { "ConformInfo" },
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
-- Customize or remove this keymap to your liking
|
|
||||||
"<leader>f",
|
|
||||||
function()
|
|
||||||
require("conform").format({ async = true, lsp_fallback = true })
|
|
||||||
end,
|
|
||||||
mode = "",
|
|
||||||
desc = "Format buffer",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- Everything in opts will be passed to setup()
|
|
||||||
opts = {
|
|
||||||
-- Define your formatters
|
|
||||||
formatters_by_ft = {
|
|
||||||
lua = { "stylua" },
|
|
||||||
fish = { "fish_indent" },
|
|
||||||
perl = { "perltidy" },
|
|
||||||
python = { "isort", "black" },
|
|
||||||
javascript = { { "prettierd", "prettier" } },
|
|
||||||
sh = { "shfmt" },
|
|
||||||
},
|
|
||||||
-- Set up format-on-save
|
|
||||||
format_on_save = {
|
|
||||||
timeout_ms = 3000,
|
|
||||||
async = false,
|
|
||||||
quit = false,
|
|
||||||
lsp_fallback = true
|
|
||||||
},
|
|
||||||
-- Customize formatters
|
|
||||||
formatters = {
|
|
||||||
shfmt = {
|
|
||||||
prepend_args = { "-i", "2" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
init = function()
|
|
||||||
-- If you want the formatexpr, here is the place to set it
|
|
||||||
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
|
||||||
end,
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
return {
|
|
||||||
"kdheepak/lazygit.nvim",
|
|
||||||
cmd = {
|
|
||||||
"LazyGit",
|
|
||||||
"LazyGitConfig",
|
|
||||||
"LazyGitCurrentFile",
|
|
||||||
"LazyGitFilter",
|
|
||||||
"LazyGitFilterCurrentFile",
|
|
||||||
},
|
|
||||||
-- optional for floating window border decoration
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
},
|
|
||||||
-- setting the keybinding for LazyGit with 'keys' is recommended in
|
|
||||||
-- order to load the plugin when the command is run for the first time
|
|
||||||
keys = {
|
|
||||||
{ "<leader>gg", "<cmd>LazyGit<cr>", desc = "LazyGit" }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
return {
|
|
||||||
-- library used by other plugins
|
|
||||||
{ "nvim-lua/plenary.nvim", lazy = true },
|
|
||||||
}
|
|
@ -3,201 +3,86 @@ return {
|
|||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
opts = {
|
opts = {
|
||||||
-- options for vim.diagnostic.config()
|
config = function(_, opts)
|
||||||
diagnostics = {
|
local lsp = require("lspconfig")
|
||||||
underline = true,
|
|
||||||
update_in_insert = false,
|
|
||||||
virtual_text = {
|
|
||||||
spacing = 4,
|
|
||||||
source = "if_many",
|
|
||||||
prefix = "●",
|
|
||||||
-- this will set set the prefix to a function that returns the diagnostics icon based on the severity
|
|
||||||
-- this only works on a recent 0.10.0 build. Will be set to "●" when not supported
|
|
||||||
-- prefix = "icons",
|
|
||||||
},
|
|
||||||
severity_sort = true,
|
|
||||||
float = {
|
|
||||||
border = 'rounded',
|
|
||||||
source = 'always',
|
|
||||||
header = '',
|
|
||||||
prefix = '',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- Enable this to enable the builtin LSP inlay hints on Neovim >= 0.10.0
|
|
||||||
-- Be aware that you also will need to properly configure your LSP server to
|
|
||||||
-- provide the inlay hints.
|
|
||||||
inlay_hints = {
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
document_highlight = {
|
|
||||||
enabled = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
local lsp = require('lspconfig')
|
|
||||||
local lsp_defaults = lsp.util.default_config
|
|
||||||
|
|
||||||
lsp_defaults.capabilities = vim.tbl_deep_extend(
|
lsp.gopls.setup({
|
||||||
'force',
|
settings = {
|
||||||
lsp_defaults.capabilities,
|
gopls = {
|
||||||
require('cmp_nvim_lsp').default_capabilities()
|
gofumpt = true,
|
||||||
)
|
codelenses = {
|
||||||
|
gc_details = false,
|
||||||
local sign = function(o)
|
generate = true,
|
||||||
-- See :help sign_define()
|
regenerate_cgo = true,
|
||||||
vim.fn.sign_define(o.name, {
|
run_govulncheck = true,
|
||||||
texthl = o.name,
|
test = true,
|
||||||
text = o.text,
|
tidy = true,
|
||||||
numhl = ''
|
upgrade_dependency = true,
|
||||||
})
|
vendor = true,
|
||||||
end
|
},
|
||||||
|
hints = {
|
||||||
sign({ name = 'DiagnosticSignError', text = '✘' })
|
assignVariableTypes = true,
|
||||||
sign({ name = 'DiagnosticSignWarn', text = '▲' })
|
compositeLiteralFields = true,
|
||||||
sign({ name = 'DiagnosticSignHint', text = '⚑' })
|
compositeLiteralTypes = true,
|
||||||
sign({ name = 'DiagnosticSignInfo', text = '' })
|
constantValues = true,
|
||||||
|
functionTypeParameters = true,
|
||||||
vim.diagnostic.config({
|
parameterNames = true,
|
||||||
virtual_text = false,
|
rangeVariableTypes = true,
|
||||||
severity_sort = true,
|
},
|
||||||
float = {
|
analyses = {
|
||||||
border = 'rounded',
|
fieldalignment = true,
|
||||||
source = 'always',
|
shadow = true,
|
||||||
header = '',
|
unusedvariable = true,
|
||||||
prefix = '',
|
unusedwrite = true,
|
||||||
},
|
useany = true,
|
||||||
})
|
},
|
||||||
|
|
||||||
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
|
|
||||||
vim.lsp.handlers.hover,
|
|
||||||
{ border = 'rounded' }
|
|
||||||
)
|
|
||||||
|
|
||||||
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(
|
|
||||||
vim.lsp.handlers.signature_help,
|
|
||||||
{ border = 'rounded' }
|
|
||||||
)
|
|
||||||
|
|
||||||
vim.lsp.handlers["workspace/diagnostic/refresh"] = function(_, _, ctx)
|
|
||||||
local ns = vim.lsp.diagnostic.get_namespace(ctx.client_id)
|
|
||||||
pcall(vim.diagnostic.reset, ns)
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('BufWritePre', {
|
|
||||||
pattern = '*.go',
|
|
||||||
callback = function()
|
|
||||||
vim.lsp.buf.code_action({ context = { only = { 'source.organizeImports' } }, apply = true })
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
local on_attach = function(client)
|
|
||||||
local bufmap = function(mode, lhs, rhs)
|
|
||||||
local opts = { buffer = true }
|
|
||||||
vim.keymap.set(mode, lhs, rhs, opts)
|
|
||||||
end
|
|
||||||
|
|
||||||
bufmap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>')
|
|
||||||
bufmap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>')
|
|
||||||
bufmap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>')
|
|
||||||
bufmap('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>')
|
|
||||||
bufmap('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>')
|
|
||||||
bufmap('n', 'gA', '<cmd>Telescope diagnostics<cr>')
|
|
||||||
bufmap('n', 'gr', '<cmd>Telescope lsp_references<cr>')
|
|
||||||
bufmap('n', 'gi', '<cmd>Telescope lsp_implementations<cr>')
|
|
||||||
bufmap('n', '<leader>cr', '<cmd>lua vim.lsp.buf.rename()<cr>')
|
|
||||||
bufmap('n', '<leader>ca', '<cmd>lua vim.lsp.buf.code_action()<cr>')
|
|
||||||
bufmap('n', 'gl', '<cmd>lua vim.diagnostic.open_float()<cr>')
|
|
||||||
bufmap('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<cr>')
|
|
||||||
bufmap('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<cr>')
|
|
||||||
end
|
|
||||||
|
|
||||||
lsp.gopls.setup {
|
|
||||||
settings = {
|
|
||||||
gopls = {
|
|
||||||
gofumpt = true,
|
|
||||||
codelenses = {
|
|
||||||
gc_details = false,
|
|
||||||
generate = true,
|
|
||||||
regenerate_cgo = true,
|
|
||||||
run_govulncheck = true,
|
|
||||||
test = true,
|
|
||||||
tidy = true,
|
|
||||||
upgrade_dependency = true,
|
|
||||||
vendor = true,
|
|
||||||
},
|
|
||||||
hints = {
|
|
||||||
assignVariableTypes = true,
|
|
||||||
compositeLiteralFields = true,
|
|
||||||
compositeLiteralTypes = true,
|
|
||||||
constantValues = true,
|
|
||||||
functionTypeParameters = true,
|
|
||||||
parameterNames = true,
|
|
||||||
rangeVariableTypes = true,
|
|
||||||
},
|
|
||||||
analyses = {
|
|
||||||
fieldalignment = true,
|
|
||||||
shadow = true,
|
|
||||||
unusedvariable = true,
|
|
||||||
unusedwrite = true,
|
|
||||||
useany = true,
|
|
||||||
},
|
|
||||||
usePlaceholders = true,
|
|
||||||
completeUnimported = true,
|
|
||||||
staticcheck = true,
|
|
||||||
directoryFilters = { "-.git", "-.vscode", "-.idea", "-.vscode-test", "-node_modules" },
|
|
||||||
semanticTokens = true
|
|
||||||
},
|
|
||||||
},
|
|
||||||
on_attach = on_attach
|
|
||||||
}
|
|
||||||
lsp.clangd.setup {
|
|
||||||
settings = {
|
|
||||||
clangd = {
|
|
||||||
cmd = {
|
|
||||||
"clangd",
|
|
||||||
"--background-index",
|
|
||||||
"--clang-tidy",
|
|
||||||
"--header-insertion=iwyu",
|
|
||||||
"--completion-style=detailed",
|
|
||||||
"--function-arg-placeholders",
|
|
||||||
"--fallback-style=llvm",
|
|
||||||
},
|
|
||||||
init_options = {
|
|
||||||
usePlaceholders = true,
|
usePlaceholders = true,
|
||||||
completeUnimported = true,
|
completeUnimported = true,
|
||||||
clangdFileStatus = true,
|
staticcheck = true,
|
||||||
|
directoryFilters = { "-.git", "-.vscode", "-.idea", "-.vscode-test", "-node_modules" },
|
||||||
|
semanticTokens = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
})
|
||||||
on_attach = on_attach
|
lsp.clangd.setup({
|
||||||
}
|
settings = {
|
||||||
lsp.ltex.setup {
|
clangd = {
|
||||||
on_attach = on_attach,
|
cmd = {
|
||||||
filetypes = { "latex", "tex", "bib", "mkd", "gitcommit", "text" },
|
"clangd",
|
||||||
}
|
"--background-index",
|
||||||
lsp.svelte.setup { on_attach = on_attach }
|
"--clang-tidy",
|
||||||
lsp.perlls.setup { on_attach = on_attach }
|
"--header-insertion=iwyu",
|
||||||
lsp.tsserver.setup { on_attach = on_attach }
|
"--completion-style=detailed",
|
||||||
lsp.lua_ls.setup {
|
"--function-arg-placeholders",
|
||||||
settings = {
|
"--fallback-style=llvm",
|
||||||
Lua = {
|
},
|
||||||
workspace = {
|
init_options = {
|
||||||
checkThirdParty = false,
|
usePlaceholders = true,
|
||||||
|
completeUnimported = true,
|
||||||
|
clangdFileStatus = true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
codeLens = {
|
},
|
||||||
enable = true,
|
})
|
||||||
|
lsp.lua_ls.setup({
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
workspace = {
|
||||||
|
checkThirdParty = false,
|
||||||
|
},
|
||||||
|
codeLens = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
completion = {
|
||||||
|
callSnippet = "Replace",
|
||||||
|
},
|
||||||
|
diagnostics = {
|
||||||
|
globals = { "vim" },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
completion = {
|
},
|
||||||
callSnippet = "Replace",
|
})
|
||||||
},
|
end,
|
||||||
diagnostics = {
|
},
|
||||||
globals = { 'vim' }
|
},
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
on_attach = on_attach
|
|
||||||
}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
return {
|
|
||||||
-- add telescope-fzf-native
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
keys = {
|
|
||||||
{ "<leader><space>", "<cmd>Telescope find_files<cr>", desc = "Find Files" },
|
|
||||||
},
|
|
||||||
dependencies = {
|
|
||||||
"nvim-telescope/telescope-fzf-native.nvim",
|
|
||||||
build = "make",
|
|
||||||
config = function()
|
|
||||||
require("telescope").load_extension("fzf")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,113 +0,0 @@
|
|||||||
return {
|
|
||||||
-- Treesitter is a new parser generator tool that we can
|
|
||||||
-- use in Neovim to power faster and more accurate
|
|
||||||
-- syntax highlighting.
|
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
version = false, -- last release is way too old and doesn't work on Windows
|
|
||||||
build = ":TSUpdate",
|
|
||||||
event = { "VeryLazy" },
|
|
||||||
init = function(plugin)
|
|
||||||
-- PERF: add nvim-treesitter queries to the rtp and it's custom query predicates early
|
|
||||||
-- This is needed because a bunch of plugins no longer `require("nvim-treesitter")`, which
|
|
||||||
-- no longer trigger the **nvim-treesitter** module to be loaded in time.
|
|
||||||
-- Luckily, the only things that those plugins need are the custom queries, which we make available
|
|
||||||
-- during startup.
|
|
||||||
require("lazy.core.loader").add_to_rtp(plugin)
|
|
||||||
require("nvim-treesitter.query_predicates")
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
|
||||||
config = function()
|
|
||||||
-- When in diff mode, we want to use the default
|
|
||||||
-- vim text objects c & C instead of the treesitter ones.
|
|
||||||
local move = require("nvim-treesitter.textobjects.move") ---@type table<string,fun(...)>
|
|
||||||
local configs = require("nvim-treesitter.configs")
|
|
||||||
for name, fn in pairs(move) do
|
|
||||||
if name:find("goto") == 1 then
|
|
||||||
move[name] = function(q, ...)
|
|
||||||
if vim.wo.diff then
|
|
||||||
local config = configs.get_module("textobjects.move")
|
|
||||||
[name] ---@type table<string,string>
|
|
||||||
for key, query in pairs(config or {}) do
|
|
||||||
if q == query and key:find("[%]%[][cC]") then
|
|
||||||
vim.cmd("normal! " .. key)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return fn(q, ...)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" },
|
|
||||||
keys = {
|
|
||||||
{ "<c-space>", desc = "Increment selection" },
|
|
||||||
{ "<bs>", desc = "Decrement selection", mode = "x" },
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
highlight = { enable = true },
|
|
||||||
indent = { enable = true },
|
|
||||||
ensure_installed = {
|
|
||||||
"bash",
|
|
||||||
"c",
|
|
||||||
"diff",
|
|
||||||
"html",
|
|
||||||
"javascript",
|
|
||||||
"jsdoc",
|
|
||||||
"json",
|
|
||||||
"jsonc",
|
|
||||||
"lua",
|
|
||||||
"luadoc",
|
|
||||||
"luap",
|
|
||||||
"markdown",
|
|
||||||
"markdown_inline",
|
|
||||||
"python",
|
|
||||||
"query",
|
|
||||||
"regex",
|
|
||||||
"svelte",
|
|
||||||
"toml",
|
|
||||||
"tsx",
|
|
||||||
"typescript",
|
|
||||||
"vim",
|
|
||||||
"vimdoc",
|
|
||||||
"yaml",
|
|
||||||
},
|
|
||||||
incremental_selection = {
|
|
||||||
enable = true,
|
|
||||||
keymaps = {
|
|
||||||
init_selection = "<C-space>",
|
|
||||||
node_incremental = "<C-space>",
|
|
||||||
scope_incremental = false,
|
|
||||||
node_decremental = "<bs>",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
textobjects = {
|
|
||||||
move = {
|
|
||||||
enable = true,
|
|
||||||
goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer" },
|
|
||||||
goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer" },
|
|
||||||
goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer" },
|
|
||||||
goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
if type(opts.ensure_installed) == "table" then
|
|
||||||
local added = {}
|
|
||||||
opts.ensure_installed = vim.tbl_filter(function(lang)
|
|
||||||
if added[lang] then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
added[lang] = true
|
|
||||||
return true
|
|
||||||
end, opts.ensure_installed)
|
|
||||||
end
|
|
||||||
require("nvim-treesitter.configs").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
163
dot_config/nvim/lua/plugins/ui.lua
Normal file
163
dot_config/nvim/lua/plugins/ui.lua
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
local function getWords()
|
||||||
|
return vim.fn.wordcount().words
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
--- statusline
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.sections.lualine_b = { { "branch", icon = " " } }
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"RRethy/vim-illuminate",
|
||||||
|
config = function()
|
||||||
|
-- change the highlight style
|
||||||
|
vim.api.nvim_set_hl(0, "IlluminatedWordText", { link = "Visual" })
|
||||||
|
vim.api.nvim_set_hl(0, "IlluminatedWordRead", { link = "Visual" })
|
||||||
|
vim.api.nvim_set_hl(0, "IlluminatedWordWrite", { link = "Visual" })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"NvChad/nvim-colorizer.lua",
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.filetypes = {
|
||||||
|
"html",
|
||||||
|
"css",
|
||||||
|
"scss",
|
||||||
|
"javascript",
|
||||||
|
"typescript",
|
||||||
|
"typescriptreact",
|
||||||
|
"javascriptreact",
|
||||||
|
"lua",
|
||||||
|
}
|
||||||
|
opts.user_default_options = {
|
||||||
|
mode = "background",
|
||||||
|
tailwind = false, -- Enable tailwind colors
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvimdev/dashboard-nvim",
|
||||||
|
event = "VimEnter",
|
||||||
|
opts = function()
|
||||||
|
vim.api.nvim_set_hl(0, "DashboardHeader", { fg = "#79b8ff" })
|
||||||
|
vim.api.nvim_set_hl(0, "DashboardIcon", { fg = "#39c5cf" })
|
||||||
|
vim.api.nvim_set_hl(0, "DashboardKey", { fg = "#39c5cf" })
|
||||||
|
vim.api.nvim_set_hl(0, "DashboardFooter", { fg = "#959da5" })
|
||||||
|
local logo = [[
|
||||||
|
_ _ _ _
|
||||||
|
| | (_) | | | |
|
||||||
|
_ __ ___ ___ ___| |__ _ _ _ ___| |__ __ _ _ __ __| |
|
||||||
|
| '_ ` _ \ / _ \ / _ \ '_ \| | | | / __| '_ \ / _` | '_ \ / _` |
|
||||||
|
| | | | | | (_) | __/ |_) | | |_| \__ \ |_) | (_| | | | | (_| |
|
||||||
|
|_| |_| |_|\___/ \___|_.__/|_|\__,_|___/_.__/ \__,_|_| |_|\__,_| ]]
|
||||||
|
|
||||||
|
logo = string.rep("\n", 8) .. logo .. "\n\n"
|
||||||
|
|
||||||
|
local opts = {
|
||||||
|
theme = "doom",
|
||||||
|
hide = {
|
||||||
|
statusline = false,
|
||||||
|
},
|
||||||
|
config = {
|
||||||
|
header = vim.split(logo, "\n"),
|
||||||
|
center = {
|
||||||
|
{
|
||||||
|
action = "lua LazyVim.pick()()",
|
||||||
|
desc = " Find file",
|
||||||
|
icon = " ",
|
||||||
|
key = "f",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action = "Telescope oldfiles",
|
||||||
|
desc = " Recent files",
|
||||||
|
icon = " ",
|
||||||
|
key = "r",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action = 'lua LazyVim.pick("live_grep")()',
|
||||||
|
desc = " Find text",
|
||||||
|
icon = " ",
|
||||||
|
key = "g",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action = "lua LazyVim.pick.config_files()()",
|
||||||
|
desc = " Config",
|
||||||
|
icon = " ",
|
||||||
|
key = "c",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action = "Telekasten find_notes",
|
||||||
|
desc = " Find notes",
|
||||||
|
icon = " ",
|
||||||
|
key = "n",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action = "LazyExtras",
|
||||||
|
desc = " Lazy Extras",
|
||||||
|
icon = " ",
|
||||||
|
key = "x",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action = "Lazy",
|
||||||
|
desc = " Lazy",
|
||||||
|
icon = " ",
|
||||||
|
key = "l",
|
||||||
|
},
|
||||||
|
{ action = "qa", desc = " Quit", icon = " ", key = "q" },
|
||||||
|
},
|
||||||
|
footer = function()
|
||||||
|
local stats = require("lazy").stats()
|
||||||
|
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||||
|
return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, button in ipairs(opts.config.center) do
|
||||||
|
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
|
||||||
|
button.key_format = " %s"
|
||||||
|
end
|
||||||
|
|
||||||
|
-- close Lazy and re-open when the dashboard is ready
|
||||||
|
if vim.o.filetype == "lazy" then
|
||||||
|
vim.cmd.close()
|
||||||
|
vim.api.nvim_create_autocmd("User", {
|
||||||
|
pattern = "DashboardLoaded",
|
||||||
|
callback = function()
|
||||||
|
require("lazy").show()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
return opts
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"stevearc/oil.nvim",
|
||||||
|
opts = {},
|
||||||
|
config = function()
|
||||||
|
require("oil").setup({
|
||||||
|
default_file_explorer = true,
|
||||||
|
delete_to_trash = true,
|
||||||
|
skip_confirm_for_simple_edits = true,
|
||||||
|
view_options = {
|
||||||
|
show_hidden = true,
|
||||||
|
natural_order = true,
|
||||||
|
is_always_hidden = function(name, _)
|
||||||
|
return name == ".." or name == ".git"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
win_options = {
|
||||||
|
wrap = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
@ -1,578 +0,0 @@
|
|||||||
local function getWords()
|
|
||||||
return vim.fn.wordcount().words
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
{{- if eq .chezmoi.os "openbsd" }}
|
|
||||||
-- Better `vim.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,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- better vim.ui
|
|
||||||
{
|
|
||||||
"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,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- statusline
|
|
||||||
{
|
|
||||||
"nvim-lualine/lualine.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
init = function()
|
|
||||||
vim.g.lualine_laststatus = vim.o.laststatus
|
|
||||||
vim.o.laststatus = 0
|
|
||||||
end,
|
|
||||||
opts = {
|
|
||||||
options = {
|
|
||||||
theme = 'auto',
|
|
||||||
icons_enabled = true,
|
|
||||||
globalstatus = true,
|
|
||||||
component_separators = "|",
|
|
||||||
disabled_filetypes = { statusline = { "dashboard", "alpha", "starter" } },
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_a = { "mode" },
|
|
||||||
lualine_b = { { "branch", icon = " " }, "diagnostics" },
|
|
||||||
lualine_c = { "filename" },
|
|
||||||
lualine_x = { "encoding",
|
|
||||||
{
|
|
||||||
"fileformat",
|
|
||||||
symbols = {
|
|
||||||
unix = " ",
|
|
||||||
dos = " ",
|
|
||||||
mac = " "
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ "filetype", icon_only = true } },
|
|
||||||
lualine_y = { "progress" },
|
|
||||||
lualine_z = { "location" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Active indent guide and indent text objects. When you're browsing
|
|
||||||
-- code, this highlights the current level of indentation, and animates
|
|
||||||
-- the highlighting.
|
|
||||||
{
|
|
||||||
"echasnovski/mini.indentscope",
|
|
||||||
version = false, -- wait till new 0.7.0 release to put it back on semver
|
|
||||||
opts = {
|
|
||||||
-- symbol = "▏",
|
|
||||||
symbol = "│",
|
|
||||||
options = { try_as_border = true },
|
|
||||||
},
|
|
||||||
init = function()
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
|
||||||
pattern = {
|
|
||||||
"help",
|
|
||||||
"alpha",
|
|
||||||
"dashboard",
|
|
||||||
"neo-tree",
|
|
||||||
"Trouble",
|
|
||||||
"lazy",
|
|
||||||
"mason",
|
|
||||||
"notify",
|
|
||||||
"toggleterm",
|
|
||||||
"lazyterm",
|
|
||||||
},
|
|
||||||
callback = function()
|
|
||||||
vim.b.miniindentscope_disable = true
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Displays a popup with possible key bindings of the command you started typing
|
|
||||||
{
|
|
||||||
"folke/which-key.nvim",
|
|
||||||
opts = function(_, opts)
|
|
||||||
opts.defaults["<leader>sn"] = { name = "+noice" }
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Highly experimental plugin that completely replaces the UI for messages, cmdline and the popupmenu.
|
|
||||||
{
|
|
||||||
"folke/noice.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
opts = {
|
|
||||||
lsp = {
|
|
||||||
override = {
|
|
||||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
|
||||||
["vim.lsp.util.stylize_markdown"] = true,
|
|
||||||
["cmp.entry.get_documentation"] = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
routes = {
|
|
||||||
{
|
|
||||||
filter = {
|
|
||||||
event = "msg_show",
|
|
||||||
any = {
|
|
||||||
{ find = "%d+L, %d+B" },
|
|
||||||
{ find = "; after #%d+" },
|
|
||||||
{ find = "; before #%d+" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
view = "mini",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
presets = {
|
|
||||||
bottom_search = true,
|
|
||||||
command_palette = true,
|
|
||||||
long_message_to_split = true,
|
|
||||||
inc_rename = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<S-Enter>",
|
|
||||||
function() require("noice").redirect(vim.fn.getcmdline()) end,
|
|
||||||
mode = "c",
|
|
||||||
desc =
|
|
||||||
"Redirect Cmdline"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>snl",
|
|
||||||
function() require("noice").cmd("last") end,
|
|
||||||
desc =
|
|
||||||
"Noice Last Message"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>snh",
|
|
||||||
function() require("noice").cmd("history") end,
|
|
||||||
desc =
|
|
||||||
"Noice History"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>sna",
|
|
||||||
function() require("noice").cmd("all") end,
|
|
||||||
desc =
|
|
||||||
"Noice All"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>snd",
|
|
||||||
function() require("noice").cmd("dismiss") end,
|
|
||||||
desc =
|
|
||||||
"Dismiss All"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<c-f>",
|
|
||||||
function() if not require("noice.lsp").scroll(4) then return "<c-f>" end end,
|
|
||||||
silent = true,
|
|
||||||
expr = true,
|
|
||||||
desc =
|
|
||||||
"Scroll forward",
|
|
||||||
mode = {
|
|
||||||
"i", "n", "s" }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<c-b>",
|
|
||||||
function() if not require("noice.lsp").scroll(-4) then return "<c-b>" end end,
|
|
||||||
silent = true,
|
|
||||||
expr = true,
|
|
||||||
desc =
|
|
||||||
"Scroll backward",
|
|
||||||
mode = {
|
|
||||||
"i", "n", "s" }
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- icons
|
|
||||||
{
|
|
||||||
"nvim-tree/nvim-web-devicons",
|
|
||||||
lazy = true,
|
|
||||||
opts = function()
|
|
||||||
local devicons = require("nvim-web-devicons")
|
|
||||||
local palette = {
|
|
||||||
orange = "#d18616",
|
|
||||||
black = "#586069",
|
|
||||||
bright_black = "#959da5",
|
|
||||||
white = "#d1d5da",
|
|
||||||
bright_white = "#fafbfc",
|
|
||||||
red = "#ea4a5a",
|
|
||||||
bright_red = "#f97583",
|
|
||||||
green = "#34d058",
|
|
||||||
bright_green = "#85e89d",
|
|
||||||
yellow = "#ffea7f",
|
|
||||||
bright_yellow = "#ffea7f",
|
|
||||||
blue = "#2188ff",
|
|
||||||
bright_blue = "#79b8ff",
|
|
||||||
magenta = "#b392f0",
|
|
||||||
bright_magenta = "#b392f0",
|
|
||||||
cyan = "#39c5cf",
|
|
||||||
bright_cyan = "#56d4dd",
|
|
||||||
}
|
|
||||||
devicons.set_icon({
|
|
||||||
[".zshrc"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_black,
|
|
||||||
name = "Zshrc",
|
|
||||||
},
|
|
||||||
["bash"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_black,
|
|
||||||
name = "Bash",
|
|
||||||
},
|
|
||||||
["c"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_blue,
|
|
||||||
name = "C",
|
|
||||||
},
|
|
||||||
["c++"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_red,
|
|
||||||
name = "CPlusPlus",
|
|
||||||
},
|
|
||||||
["cc"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_red,
|
|
||||||
name = "CPlusPlus",
|
|
||||||
},
|
|
||||||
["go"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_blue,
|
|
||||||
name = "Go",
|
|
||||||
},
|
|
||||||
["js"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.yellow,
|
|
||||||
name = "Js",
|
|
||||||
},
|
|
||||||
["lua"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_blue,
|
|
||||||
name = "Lua",
|
|
||||||
},
|
|
||||||
["markdown"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_blue,
|
|
||||||
name = "Markdown",
|
|
||||||
},
|
|
||||||
["md"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_blue,
|
|
||||||
name = "Md",
|
|
||||||
},
|
|
||||||
["mdx"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_blue,
|
|
||||||
name = "Mdx",
|
|
||||||
},
|
|
||||||
["php"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.magenta,
|
|
||||||
name = "Php",
|
|
||||||
},
|
|
||||||
["pl"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_blue,
|
|
||||||
name = "Pl",
|
|
||||||
},
|
|
||||||
["py"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_blue,
|
|
||||||
name = "Py",
|
|
||||||
},
|
|
||||||
["pyc"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_blue,
|
|
||||||
name = "Pyc",
|
|
||||||
},
|
|
||||||
["pyd"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_blue,
|
|
||||||
name = "Pyd",
|
|
||||||
},
|
|
||||||
["pyo"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_blue,
|
|
||||||
name = "Pyo",
|
|
||||||
},
|
|
||||||
["rake"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_red,
|
|
||||||
name = "Rake",
|
|
||||||
},
|
|
||||||
["rakefile"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_red,
|
|
||||||
name = "Rakefile",
|
|
||||||
},
|
|
||||||
["rb"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_red,
|
|
||||||
name = "Rb",
|
|
||||||
},
|
|
||||||
["sh"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_black,
|
|
||||||
name = "Sh",
|
|
||||||
},
|
|
||||||
["sql"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_black,
|
|
||||||
name = "Sql",
|
|
||||||
},
|
|
||||||
["svelte"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.orange,
|
|
||||||
name = "Svelte"
|
|
||||||
},
|
|
||||||
["yaml"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_black,
|
|
||||||
name = "Yaml",
|
|
||||||
},
|
|
||||||
["yml"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_black,
|
|
||||||
name = "Yml",
|
|
||||||
},
|
|
||||||
["zsh"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_black,
|
|
||||||
name = "Zsh",
|
|
||||||
},
|
|
||||||
["terminal"] = {
|
|
||||||
icon = " ",
|
|
||||||
color = palette.bright_black,
|
|
||||||
name = "Terminal",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"yamatsum/nvim-nonicons",
|
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
|
||||||
lazy = true
|
|
||||||
},
|
|
||||||
|
|
||||||
-- ui components
|
|
||||||
{ "MunifTanjim/nui.nvim", lazy = true },
|
|
||||||
{{ else }}
|
|
||||||
-- change lualine
|
|
||||||
{
|
|
||||||
"nvim-lualine/lualine.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
opts = function(_, opts)
|
|
||||||
opts.sections.lualine_b = { { "branch", icon = " " } }
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{{ end }}
|
|
||||||
{
|
|
||||||
"RRethy/vim-illuminate",
|
|
||||||
config = function()
|
|
||||||
-- change the highlight style
|
|
||||||
vim.api.nvim_set_hl(0, "IlluminatedWordText", { link = "Visual" })
|
|
||||||
vim.api.nvim_set_hl(0, "IlluminatedWordRead", { link = "Visual" })
|
|
||||||
vim.api.nvim_set_hl(0, "IlluminatedWordWrite", { link = "Visual" })
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"NvChad/nvim-colorizer.lua",
|
|
||||||
opts = function(_, opts)
|
|
||||||
opts.filetypes = {
|
|
||||||
"html",
|
|
||||||
"css",
|
|
||||||
"scss",
|
|
||||||
"javascript",
|
|
||||||
"typescript",
|
|
||||||
"typescriptreact",
|
|
||||||
"javascriptreact",
|
|
||||||
"lua",
|
|
||||||
}
|
|
||||||
opts.user_default_options = {
|
|
||||||
mode = "background",
|
|
||||||
tailwind = false, -- Enable tailwind colors
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"nvimdev/dashboard-nvim",
|
|
||||||
event = "VimEnter",
|
|
||||||
opts = function()
|
|
||||||
vim.api.nvim_set_hl(0, "DashboardHeader", { fg = "#79b8ff" })
|
|
||||||
vim.api.nvim_set_hl(0, "DashboardIcon", { fg = "#39c5cf" })
|
|
||||||
vim.api.nvim_set_hl(0, "DashboardKey", { fg = "#39c5cf" })
|
|
||||||
vim.api.nvim_set_hl(0, "DashboardFooter", { fg = "#959da5" })
|
|
||||||
local logo = [[
|
|
||||||
_ _ _ _
|
|
||||||
| | (_) | | | |
|
|
||||||
_ __ ___ ___ ___| |__ _ _ _ ___| |__ __ _ _ __ __| |
|
|
||||||
| '_ ` _ \ / _ \ / _ \ '_ \| | | | / __| '_ \ / _` | '_ \ / _` |
|
|
||||||
| | | | | | (_) | __/ |_) | | |_| \__ \ |_) | (_| | | | | (_| |
|
|
||||||
|_| |_| |_|\___/ \___|_.__/|_|\__,_|___/_.__/ \__,_|_| |_|\__,_| ]]
|
|
||||||
|
|
||||||
logo = string.rep("\n", 8) .. logo .. "\n\n"
|
|
||||||
|
|
||||||
local opts = {
|
|
||||||
theme = "doom",
|
|
||||||
hide = {
|
|
||||||
statusline = false,
|
|
||||||
},
|
|
||||||
config = {
|
|
||||||
header = vim.split(logo, "\n"),
|
|
||||||
center = {
|
|
||||||
{{- if eq .chezmoi.os "openbsd" }}
|
|
||||||
{
|
|
||||||
action = "Telescope find_files",
|
|
||||||
desc = " Find file",
|
|
||||||
icon = " ",
|
|
||||||
key = "f",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
action = "Telescope oldfiles",
|
|
||||||
desc = " Recent files",
|
|
||||||
icon = " ",
|
|
||||||
key = "r",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
action = "Telescope live_grep",
|
|
||||||
desc = " Find text",
|
|
||||||
icon = " ",
|
|
||||||
key = "g",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
action = [[lua require("telescope.builtin").find_files({ cwd = vim.fn.stdpath("config") })]],
|
|
||||||
desc = " Config",
|
|
||||||
icon = " ",
|
|
||||||
key = "c",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
action = "Telekasten find_notes",
|
|
||||||
desc = " Find notes",
|
|
||||||
icon = " ",
|
|
||||||
key = "n",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
action = "Lazy",
|
|
||||||
desc = " Lazy",
|
|
||||||
icon = " ",
|
|
||||||
key = "l",
|
|
||||||
},
|
|
||||||
{ action = "qa", desc = " Quit", icon = " ", key = "q" },
|
|
||||||
{{- else }}
|
|
||||||
{
|
|
||||||
action = "lua LazyVim.pick()()",
|
|
||||||
desc = " Find file",
|
|
||||||
icon = " ",
|
|
||||||
key = "f",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
action = "Telescope oldfiles",
|
|
||||||
desc = " Recent files",
|
|
||||||
icon = " ",
|
|
||||||
key = "r",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
action = 'lua LazyVim.pick("live_grep")()',
|
|
||||||
desc = " Find text",
|
|
||||||
icon = " ",
|
|
||||||
key = "g",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
action = "lua LazyVim.pick.config_files()()",
|
|
||||||
desc = " Config",
|
|
||||||
icon = " ",
|
|
||||||
key = "c",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
action = "Telekasten find_notes",
|
|
||||||
desc = " Find notes",
|
|
||||||
icon = " ",
|
|
||||||
key = "n",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
action = "Lazy",
|
|
||||||
desc = " Lazy",
|
|
||||||
icon = " ",
|
|
||||||
key = "l",
|
|
||||||
},
|
|
||||||
{ action = "qa", desc = " Quit", icon = " ", key = "q" },
|
|
||||||
{{- end }}
|
|
||||||
},
|
|
||||||
footer = function()
|
|
||||||
local stats = require("lazy").stats()
|
|
||||||
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
|
||||||
return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, button in ipairs(opts.config.center) do
|
|
||||||
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
|
|
||||||
button.key_format = " %s"
|
|
||||||
end
|
|
||||||
|
|
||||||
-- close Lazy and re-open when the dashboard is ready
|
|
||||||
if vim.o.filetype == "lazy" then
|
|
||||||
vim.cmd.close()
|
|
||||||
vim.api.nvim_create_autocmd("User", {
|
|
||||||
pattern = "DashboardLoaded",
|
|
||||||
callback = function()
|
|
||||||
require("lazy").show()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return opts
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"stevearc/oil.nvim",
|
|
||||||
opts = {},
|
|
||||||
config = function()
|
|
||||||
require("oil").setup({
|
|
||||||
default_file_explorer = true,
|
|
||||||
delete_to_trash = true,
|
|
||||||
skip_confirm_for_simple_edits = true,
|
|
||||||
view_options = {
|
|
||||||
show_hidden = true,
|
|
||||||
natural_order = true,
|
|
||||||
is_always_hidden = function(name, _)
|
|
||||||
return name == ".." or name == ".git"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
win_options = {
|
|
||||||
wrap = true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,4 +1,4 @@
|
|||||||
syncthing -no-browser -home="/home/jan/.config/syncthing" &
|
syncthing -no-browser &
|
||||||
unclutter -root -idle 2 -noevents &
|
unclutter -root -idle 2 -noevents &
|
||||||
xidle -timeout 300 -program "/usr/local/bin/slock" &
|
xidle -timeout 300 -program "/usr/local/bin/slock" &
|
||||||
feh --no-fehbg --bg-center '/home/jan/.config/background.png'
|
feh --no-fehbg --bg-center '/home/jan/.config/background.png'
|
||||||
|
Loading…
Reference in New Issue
Block a user