Compare commits
11 Commits
08fe84eb47
...
ec1123ecb9
Author | SHA1 | Date |
---|---|---|
Lockszmith (@kateryna) | ec1123ecb9 | |
Lockszmith (@kateryna) | db7ba3de56 | |
Lockszmith (@kateryna) | db589b02b9 | |
Lockszmith (@kateryna) | f4c0bb36c1 | |
Lockszmith (@kateryna) | 9ebde5fb79 | |
Lockszmith (@kateryna) | 77a7982f2c | |
Lockszmith (@kateryna) | a85ed4e561 | |
{{ .data.gitname }} | 3e3c82134b | |
Lockszmith (kateryna) | 68eb71e507 | |
Lockszmith (kateryna) | 3bc5e3d578 | |
Lockszmith (kateryna) | 8f255c664f |
|
@ -0,0 +1,32 @@
|
|||
{{- $sysname := promptStringOnce . "sysname" "System name" -}}
|
||||
{{- $sysgroup := promptStringOnce . "sysgroup" "System group" -}}
|
||||
{{- $sysarea := promptStringOnce . "sysarea" "System area" -}}
|
||||
{{- $gitEmail := promptStringOnce . "gitEmail" "email address (for git commits)" -}}
|
||||
{{- $gitName := promptStringOnce . "gitName" "Full name (for git commits)" -}}
|
||||
|
||||
[data]
|
||||
{{- if ($sysname) }}
|
||||
sysname = {{ $sysname | quote }}
|
||||
{{- end -}}
|
||||
{{- if ($sysgroup) }}
|
||||
sysgroup = {{ $sysgroup | quote }}
|
||||
{{- end -}}
|
||||
{{- if ($sysarea) }}
|
||||
sysarea = {{ $sysarea | quote }}
|
||||
{{ end -}}
|
||||
|
||||
{{ if ($gitEmail) }}
|
||||
gitEmail = {{ $gitEmail | quote }}
|
||||
{{- end -}}
|
||||
{{- if ($gitName) }}
|
||||
gitName = {{ $gitName | quote }}
|
||||
{{- end }}
|
||||
|
||||
[diff]
|
||||
# command = "nvim"
|
||||
# args = ["-d", "{{- "{{ .Destination }}" -}}", "{{- "{{ .Target }}" -}}"]
|
||||
|
||||
command = "delta"
|
||||
args = ["--paging=never", "{{ "{{ .Destination }}" }}", "{{ "{{ .Target }}" }}"]
|
||||
pager = "delta"
|
||||
|
|
@ -3,18 +3,42 @@
|
|||
# type string none External type (file, archive, archive-file, or git-repo)
|
||||
# refreshPeriod duration 0 Refresh period (Examples: one day (24h), one week (168h), or four weeks (672h))
|
||||
|
||||
{{ $externals := dict -}}
|
||||
|
||||
{{- with $repo := "dandavison/delta" -}}
|
||||
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
|
||||
{{- $_ := set $externals ".local/bin/delta" (dict
|
||||
"type" "archive-file"
|
||||
"url" (printf "https://github.com/%s/releases/download/%s/delta-%s-x86_64-unknown-linux-musl.tar.gz" $repo $version $version)
|
||||
"path" (printf "delta-%s-x86_64-unknown-linux-musl/delta" $version)
|
||||
"refreshPeriod" "168h")
|
||||
-}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with $repo := "zellij-org/zellij" -}}
|
||||
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
|
||||
{{- $_ := set $externals ".cache/chezmoi/tmp/zellij" (dict
|
||||
"type" "archive"
|
||||
"url" (printf "https://github.com/%s/releases/download/%s/zellij-x86_64-unknown-linux-musl.tar.gz" $repo $version)
|
||||
"refreshPeriod" "168h")
|
||||
-}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $externals | toYaml }}
|
||||
".config/sz.env/lib/ble.sh.curl":
|
||||
type: "archive"
|
||||
url: "https://github.com/akinomyoga/ble.sh/releases/download/nightly/ble-nightly.tar.xz"
|
||||
refreshPeriod: "168h"
|
||||
|
||||
".config/sz.env/lib/delta.themes.gitconfig":
|
||||
type: "file"
|
||||
url: "https://raw.githubusercontent.com/dandavison/delta/refs/heads/main/themes.gitconfig"
|
||||
refreshPeriod: "168h"
|
||||
|
||||
".config/sz.env/lib/bash-preexec/bash-preexec.sh":
|
||||
type: "file"
|
||||
url: "https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh"
|
||||
refreshPeriod: "168h"
|
||||
|
||||
".cache/chezmoi/tmp/zellij":
|
||||
type: "archive"
|
||||
url: "https://github.com/zellij-org/zellij/releases/download/v0.40.1/zellij-x86_64-unknown-linux-musl.tar.gz"
|
||||
refreshPeriod: "168h"
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
/**/.git
|
||||
/**/.git/**
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
# This is Git's per-user configuration file.
|
||||
# It is recommended to edit this using chezmoi:
|
||||
# cz edit ~/.gitconfig
|
||||
|
||||
[include]
|
||||
path = .config/sz.env/lib/delta.themes.gitconfig
|
||||
|
||||
[user]
|
||||
name = {{ .gitName }}
|
||||
email = {{ .gitEmail }}
|
||||
|
||||
[credential]
|
||||
helper = cache --timeout 21600
|
||||
helper = oauth
|
||||
# helper = oauth -device
|
||||
[credential "https://code.lksz.me"]
|
||||
oauthClientId = a4792ccc-144e-407e-86c9-5e7d8d9c3269
|
||||
oauthAuthURL = /login/oauth/authorize
|
||||
oauthTokenURL = /login/oauth/access_token
|
||||
# oauthDeviceAuthURL = /login/oauth/authorize
|
||||
# oauthDeviceAuthURL = /login/oauth/authorize_device
|
||||
# oauthScopes = read_repository
|
||||
[core]
|
||||
editor = nvim
|
||||
pager = delta
|
||||
|
||||
[init]
|
||||
defaultBranch = main
|
||||
|
||||
[core]
|
||||
pager = delta
|
||||
|
||||
[interactive]
|
||||
diffFilter = delta --color-only
|
||||
|
||||
[delta]
|
||||
features = colibri
|
||||
navigate = true # use n and N to move between diff sections
|
||||
line-numbers = true
|
||||
side-by-side = true
|
||||
|
||||
[diff]
|
||||
tool = nvimdiff
|
||||
[difftool]
|
||||
prompt = false
|
||||
[difftool "nvimdiff"]
|
||||
cmd = "nvim -d \"$LOCAL\" \"$REMOTE\""
|
||||
|
||||
[merge]
|
||||
tool = nvimdiff
|
||||
conflictstyle = zdiff3
|
||||
[mergetool]
|
||||
prompt = true
|
||||
[mergetool "nvimdiff"]
|
||||
cmd = "nvim -d \"$LOCAL\" \"$REMOTE\" \"$MERGED\" -c 'wincmd w' -c 'wincmd J'"
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
## where to store your database, default is your system data directory
|
||||
## linux/mac: ~/.local/share/atuin/history.db
|
||||
## windows: %USERPROFILE%/.local/share/atuin/history.db
|
||||
# db_path = "~/.history.db"
|
||||
|
||||
## where to store your encryption key, default is your system data directory
|
||||
## linux/mac: ~/.local/share/atuin/key
|
||||
## windows: %USERPROFILE%/.local/share/atuin/key
|
||||
# key_path = "~/.key"
|
||||
|
||||
## where to store your auth session token, default is your system data directory
|
||||
## linux/mac: ~/.local/share/atuin/session
|
||||
## windows: %USERPROFILE%/.local/share/atuin/session
|
||||
# session_path = "~/.session"
|
||||
|
||||
## date format used, either "us" or "uk"
|
||||
# dialect = "us"
|
||||
|
||||
## enable or disable automatic sync
|
||||
# auto_sync = true
|
||||
|
||||
## enable or disable automatic update checks
|
||||
# update_check = true
|
||||
|
||||
## address of the sync server
|
||||
# sync_address = "http://192.168.222.65"
|
||||
|
||||
## how often to sync history. note that this is only triggered when a command
|
||||
## is ran, so sync intervals may well be longer
|
||||
## set it to 0 to sync after every command
|
||||
# sync_frequency = "10m"
|
||||
|
||||
## which search mode to use
|
||||
## possible values: prefix, fulltext, fuzzy, skim
|
||||
# search_mode = "fuzzy"
|
||||
|
||||
## which filter mode to use
|
||||
## possible values: global, host, session, directory
|
||||
# filter_mode = "global"
|
||||
|
||||
## With workspace filtering enabled, Atuin will filter for commands executed
|
||||
## in any directory within a git repository tree (default: false)
|
||||
# workspaces = false
|
||||
|
||||
## which filter mode to use when atuin is invoked from a shell up-key binding
|
||||
## the accepted values are identical to those of "filter_mode"
|
||||
## leave unspecified to use same mode set in "filter_mode"
|
||||
# filter_mode_shell_up_key_binding = "directory"
|
||||
|
||||
## which search mode to use when atuin is invoked from a shell up-key binding
|
||||
## the accepted values are identical to those of "search_mode"
|
||||
## leave unspecified to use same mode set in "search_mode"
|
||||
# search_mode_shell_up_key_binding = "fuzzy"
|
||||
|
||||
## which style to use
|
||||
## possible values: auto, full, compact
|
||||
# style = "auto"
|
||||
|
||||
## the maximum number of lines the interface should take up
|
||||
## set it to 0 to always go full screen
|
||||
inline_height = 20
|
||||
|
||||
## Invert the UI - put the search bar at the top , Default to `false`
|
||||
# invert = false
|
||||
|
||||
## enable or disable showing a preview of the selected command
|
||||
## useful when the command is longer than the terminal width and is cut off
|
||||
show_preview = true
|
||||
|
||||
## what to do when the escape key is pressed when searching
|
||||
## possible values: return-original, return-query
|
||||
# exit_mode = "return-original"
|
||||
|
||||
## possible values: emacs, subl
|
||||
# word_jump_mode = "emacs"
|
||||
|
||||
## characters that count as a part of a word
|
||||
# word_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
||||
|
||||
## number of context lines to show when scrolling by pages
|
||||
# scroll_context_lines = 1
|
||||
|
||||
## use ctrl instead of alt as the shortcut modifier key for numerical UI shortcuts
|
||||
## alt-0 .. alt-9
|
||||
# ctrl_n_shortcuts = false
|
||||
|
||||
## prevent commands matching any of these regexes from being written to history.
|
||||
## Note that these regular expressions are unanchored, i.e. if they don't start
|
||||
## with ^ or end with $, they'll match anywhere in the command.
|
||||
## For details on the supported regular expression syntax, see
|
||||
## https://docs.rs/regex/latest/regex/#syntax
|
||||
# history_filter = [
|
||||
# "^secret-cmd",
|
||||
# "^innocuous-cmd .*--secret=.+"
|
||||
# ]
|
||||
|
||||
## prevent commands run with cwd matching any of these regexes from being written
|
||||
## to history. Note that these regular expressions are unanchored, i.e. if they don't
|
||||
## start with ^ or end with $, they'll match anywhere in CWD.
|
||||
## For details on the supported regular expression syntax, see
|
||||
## https://docs.rs/regex/latest/regex/#syntax
|
||||
# cwd_filter = [
|
||||
# "^/very/secret/area"
|
||||
# ]
|
||||
|
||||
## Configure the maximum height of the preview to show.
|
||||
## Useful when you have long scripts in your history that you want to distinguish
|
||||
## by more than the first few lines.
|
||||
max_preview_height = 8
|
||||
|
||||
## Configure whether or not to show the help row, which includes the current Atuin
|
||||
## version (and whether an update is available), a keymap hint, and the total
|
||||
## amount of commands in your history.
|
||||
show_help = true
|
||||
|
||||
## Defaults to true. This matches history against a set of default regex, and will not save it if we get a match. Defaults include
|
||||
## 1. AWS key id
|
||||
## 2. Github pat (old and new)
|
||||
## 3. Slack oauth tokens (bot, user)
|
||||
## 4. Slack webhooks
|
||||
## 5. Stripe live/test keys
|
||||
# secrets_filter = true
|
||||
|
||||
## Defaults to true. If enabled, upon hitting enter Atuin will immediately execute the command. Press tab to return to the shell and edit.
|
||||
# This applies for new installs. Old installs will keep the old behaviour unless configured otherwise.
|
||||
enter_accept = false
|
||||
|
||||
#[stats]
|
||||
# Set commands where we should consider the subcommand for statistics. Eg, kubectl get vs just kubectl
|
||||
common_subcommands = [
|
||||
"cargo",
|
||||
"go",
|
||||
"git",
|
||||
"npm",
|
||||
"yarn",
|
||||
"pnpm",
|
||||
"kubectl",
|
||||
"apt"
|
||||
]
|
||||
#
|
||||
# Set commands that should be totally stripped and ignored from stats
|
||||
#common_prefix = ["sudo"]
|
|
@ -0,0 +1,10 @@
|
|||
.github
|
||||
.github/**
|
||||
LICENSE.md
|
||||
README.md
|
||||
doc
|
||||
doc/**
|
||||
spell
|
||||
spell/**
|
||||
lua/kickstart
|
||||
lua/kickstart/**
|
|
@ -0,0 +1,6 @@
|
|||
tags
|
||||
test.sh
|
||||
.luarc.json
|
||||
nvim
|
||||
|
||||
spell/
|
|
@ -0,0 +1,6 @@
|
|||
column_width = 160
|
||||
line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
quote_style = "AutoPreferSingle"
|
||||
call_parentheses = "None"
|
|
@ -0,0 +1,109 @@
|
|||
--[[
|
||||
|
||||
=====================================================================
|
||||
==================== READ THIS BEFORE CONTINUING ====================
|
||||
=====================================================================
|
||||
======== .-----. ========
|
||||
======== .----------------------. | === | ========
|
||||
======== |.-""""""""""""""""""-.| |-----| ========
|
||||
======== || || | === | ========
|
||||
======== || KICKSTART.NVIM || |-----| ========
|
||||
======== || || | === | ========
|
||||
======== || || |-----| ========
|
||||
======== ||:Tutor || |:::::| ========
|
||||
======== |'-..................-'| |____o| ========
|
||||
======== `"")----------------(""` ___________ ========
|
||||
======== /::::::::::| |::::::::::\ \ no mouse \ ========
|
||||
======== /:::========| |==hjkl==:::\ \ required \ ========
|
||||
======== '""""""""""""' '""""""""""""' '""""""""""' ========
|
||||
======== ========
|
||||
=====================================================================
|
||||
=====================================================================
|
||||
|
||||
What is Kickstart?
|
||||
|
||||
Kickstart.nvim is *not* a distribution.
|
||||
|
||||
Kickstart.nvim is a starting point for your own configuration.
|
||||
The goal is that you can read every line of code, top-to-bottom, understand
|
||||
what your configuration is doing, and modify it to suit your needs.
|
||||
|
||||
Once you've done that, you can start exploring, configuring and tinkering to
|
||||
make Neovim your own! That might mean leaving Kickstart just the way it is for a while
|
||||
or immediately breaking it into modular pieces. It's up to you!
|
||||
|
||||
If you don't know anything about Lua, I recommend taking some time to read through
|
||||
a guide. One possible example which will only take 10-15 minutes:
|
||||
- https://learnxinyminutes.com/docs/lua/
|
||||
|
||||
After understanding a bit more about Lua, you can use `:help lua-guide` as a
|
||||
reference for how Neovim integrates Lua.
|
||||
- :help lua-guide
|
||||
- (or HTML version): https://neovim.io/doc/user/lua-guide.html
|
||||
|
||||
Kickstart Guide:
|
||||
|
||||
TODO: The very first thing you should do is to run the command `:Tutor` in Neovim.
|
||||
|
||||
If you don't know what this means, type the following:
|
||||
- <escape key>
|
||||
- :
|
||||
- Tutor
|
||||
- <enter key>
|
||||
|
||||
(If you already know the Neovim basics, you can skip this step.)
|
||||
|
||||
Once you've completed that, you can continue working through **AND READING** the rest
|
||||
of the kickstart init.lua.
|
||||
|
||||
Next, run AND READ `:help`.
|
||||
This will open up a help window with some basic information
|
||||
about reading, navigating and searching the builtin help documentation.
|
||||
|
||||
This should be the first place you go to look when you're stuck or confused
|
||||
with something. It's one of my favorite Neovim features.
|
||||
|
||||
MOST IMPORTANTLY, we provide a keymap "<space>sh" to [s]earch the [h]elp documentation,
|
||||
which is very useful when you're not exactly sure of what you're looking for.
|
||||
|
||||
I have left several `:help X` comments throughout the init.lua
|
||||
These are hints about where to find more information about the relevant settings,
|
||||
plugins or Neovim features used in Kickstart.
|
||||
|
||||
NOTE: Look for lines like this
|
||||
|
||||
Throughout the file. These are for you, the reader, to help you understand what is happening.
|
||||
Feel free to delete them once you know what you're doing, but they should serve as a guide
|
||||
for when you are first encountering a few different constructs in your Neovim config.
|
||||
|
||||
If you experience any errors while trying to install kickstart, run `:checkhealth` for more info.
|
||||
|
||||
I hope you enjoy your Neovim journey,
|
||||
- TJ
|
||||
|
||||
P.S. You can delete this when you're done too. It's your config now! :)
|
||||
--]]
|
||||
|
||||
-- Set <space> as the leader key
|
||||
-- See `:help mapleader`
|
||||
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
|
||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
||||
vim.g.have_nerd_font = true
|
||||
|
||||
-- [[ Setting options ]]
|
||||
require 'options'
|
||||
|
||||
-- [[ Basic Keymaps ]]
|
||||
require 'keymaps'
|
||||
|
||||
-- [[ Install `lazy.nvim` plugin manager ]]
|
||||
require 'lazy-bootstrap'
|
||||
|
||||
-- [[ Configure and install plugins ]]
|
||||
require 'lazy-plugins'
|
||||
|
||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||
-- vim: ts=2 sts=2 sw=2 et
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "e808bee352d1a6fcf902ca1a71cee76e60e24071" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"conform.nvim": { "branch": "master", "commit": "1a99fdc1d3aa9ccdf3021e67982a679a8c5c740c" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "863903631e676b33e8be2acb17512fdc1b80b4fb" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" },
|
||||
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"mini.nvim": { "branch": "main", "commit": "848c5e8f428faf843051768e0d56104cd02aea1f" },
|
||||
"nvim-chezmoi": { "branch": "main", "commit": "4ec840d662d8eb1b4714a9852203d51c5b97fe95" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "a9bc587e9ae0cbcb3e90a2e9342f86b3b78c4408" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "36b78d112bddd69a05e24679241962e29e494d9e" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "817bb6ffff1b9ce72cdd45d9fcfa8c9cd1ad3839" },
|
||||
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" }
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
return {
|
||||
'andre-kotake/nvim-chezmoi',
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
{ 'nvim-lua/plenary.nvim' },
|
||||
},
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
require('nvim-chezmoi').setup(opts)
|
||||
end,
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
-- You can add your own plugins here or in other files in this directory!
|
||||
-- I promise not to create any merge conflicts in this directory :)
|
||||
--
|
||||
-- See the kickstart.nvim README for more information
|
||||
return {}
|
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
{
|
||||
'andre-kotake/nvim-chezmoi',
|
||||
},
|
||||
}
|
||||
-- vim: ts=2 sts=2 sw=2 et
|
|
@ -0,0 +1,48 @@
|
|||
-- [[ Basic Keymaps ]]
|
||||
-- See `:help vim.keymap.set()`
|
||||
|
||||
-- Clear highlights on search when pressing <Esc> in normal mode
|
||||
-- See `:help hlsearch`
|
||||
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
||||
|
||||
-- Diagnostic keymaps
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
||||
|
||||
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
|
||||
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
|
||||
-- is not what someone will guess without a bit more experience.
|
||||
--
|
||||
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
|
||||
-- or just use <C-\><C-n> to exit terminal mode
|
||||
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
||||
|
||||
-- TIP: Disable arrow keys in normal mode
|
||||
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
||||
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
||||
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
||||
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
||||
|
||||
-- Keybinds to make split navigation easier.
|
||||
-- Use CTRL+<hjkl> to switch between windows
|
||||
--
|
||||
-- See `:help wincmd` for a list of all window commands
|
||||
vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
|
||||
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
|
||||
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||
|
||||
-- [[ Basic Autocommands ]]
|
||||
-- See `:help lua-guide-autocommands`
|
||||
|
||||
-- Highlight when yanking (copying) text
|
||||
-- Try it with `yap` in normal mode
|
||||
-- See `:help vim.highlight.on_yank()`
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
desc = 'Highlight when yanking (copying) text',
|
||||
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
end,
|
||||
})
|
||||
|
||||
-- vim: ts=2 sts=2 sw=2 et
|
|
@ -0,0 +1,13 @@
|
|||
-- [[ Install `lazy.nvim` plugin manager ]]
|
||||
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
|
||||
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
|
||||
local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
|
||||
if vim.v.shell_error ~= 0 then
|
||||
error('Error cloning lazy.nvim:\n' .. out)
|
||||
end
|
||||
end ---@diagnostic disable-next-line: undefined-field
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- vim: ts=2 sts=2 sw=2 et
|
|
@ -0,0 +1,89 @@
|
|||
-- [[ Configure and install plugins ]]
|
||||
--
|
||||
-- To check the current status of your plugins, run
|
||||
-- :Lazy
|
||||
--
|
||||
-- You can press `?` in this menu for help. Use `:q` to close the window
|
||||
--
|
||||
-- To update plugins you can run
|
||||
-- :Lazy update
|
||||
--
|
||||
-- NOTE: Here is where you install your plugins.
|
||||
require('lazy').setup({
|
||||
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
|
||||
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
|
||||
|
||||
-- NOTE: Plugins can also be added by using a table,
|
||||
-- with the first argument being the link and the following
|
||||
-- keys can be used to configure plugin behavior/loading/etc.
|
||||
--
|
||||
-- Use `opts = {}` to force a plugin to be loaded.
|
||||
--
|
||||
|
||||
-- modular approach: using `require 'path/name'` will
|
||||
-- include a plugin definition from file lua/path/name.lua
|
||||
|
||||
require 'kickstart/plugins/gitsigns',
|
||||
|
||||
require 'kickstart/plugins/which-key',
|
||||
|
||||
require 'kickstart/plugins/telescope',
|
||||
|
||||
require 'kickstart/plugins/lspconfig',
|
||||
|
||||
require 'kickstart/plugins/conform',
|
||||
|
||||
require 'kickstart/plugins/cmp',
|
||||
|
||||
require 'kickstart/plugins/tokyonight',
|
||||
|
||||
require 'kickstart/plugins/todo-comments',
|
||||
|
||||
require 'kickstart/plugins/mini',
|
||||
|
||||
-- require 'kickstart/plugins/treesitter',
|
||||
|
||||
-- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the
|
||||
-- init.lua. If you want these files, they are in the repository, so you can just download them and
|
||||
-- place them in the correct locations.
|
||||
|
||||
-- NOTE: Next step on your Neovim journey: Add/Configure additional plugins for Kickstart
|
||||
--
|
||||
-- Here are some example plugins that I've included in the Kickstart repository.
|
||||
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
||||
--
|
||||
-- require 'kickstart.plugins.debug',
|
||||
-- require 'kickstart.plugins.indent_line',
|
||||
-- require 'kickstart.plugins.lint',
|
||||
-- require 'kickstart.plugins.autopairs',
|
||||
-- require 'kickstart.plugins.neo-tree',
|
||||
|
||||
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||
-- This is the easiest way to modularize your config.
|
||||
--
|
||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
|
||||
{ import = 'custom.plugins' },
|
||||
}, {
|
||||
ui = {
|
||||
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
||||
-- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table
|
||||
icons = vim.g.have_nerd_font and {} or {
|
||||
cmd = '⌘',
|
||||
config = '🛠',
|
||||
event = '📅',
|
||||
ft = '📂',
|
||||
init = '⚙',
|
||||
keys = '🗝',
|
||||
plugin = '🔌',
|
||||
runtime = '💻',
|
||||
require = '🌙',
|
||||
source = '📄',
|
||||
start = '🚀',
|
||||
task = '📌',
|
||||
lazy = '💤 ',
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- vim: ts=2 sts=2 sw=2 et
|
|
@ -0,0 +1,65 @@
|
|||
-- [[ Setting options ]]
|
||||
-- See `:help vim.opt`
|
||||
-- NOTE: You can change these options as you wish!
|
||||
-- For more options, you can see `:help option-list`
|
||||
|
||||
-- Make line numbers default
|
||||
vim.opt.number = true
|
||||
-- You can also add relative line numbers, to help with jumping.
|
||||
-- Experiment for yourself to see if you like it!
|
||||
-- vim.opt.relativenumber = true
|
||||
|
||||
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||
vim.opt.mouse = 'a'
|
||||
|
||||
-- Don't show the mode, since it's already in the status line
|
||||
vim.opt.showmode = false
|
||||
|
||||
-- Sync clipboard between OS and Neovim.
|
||||
-- Schedule the setting after `UiEnter` because it can increase startup-time.
|
||||
-- Remove this option if you want your OS clipboard to remain independent.
|
||||
-- See `:help 'clipboard'`
|
||||
vim.schedule(function()
|
||||
vim.opt.clipboard = 'unnamedplus'
|
||||
end)
|
||||
|
||||
-- Enable break indent
|
||||
vim.opt.breakindent = true
|
||||
|
||||
-- Save undo history
|
||||
vim.opt.undofile = true
|
||||
|
||||
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
|
||||
-- Keep signcolumn on by default
|
||||
vim.opt.signcolumn = 'yes'
|
||||
|
||||
-- Decrease update time
|
||||
vim.opt.updatetime = 250
|
||||
|
||||
-- Decrease mapped sequence wait time
|
||||
-- Displays which-key popup sooner
|
||||
vim.opt.timeoutlen = 300
|
||||
|
||||
-- Configure how new splits should be opened
|
||||
vim.opt.splitright = true
|
||||
vim.opt.splitbelow = true
|
||||
|
||||
-- Sets how neovim will display certain whitespace characters in the editor.
|
||||
-- See `:help 'list'`
|
||||
-- and `:help 'listchars'`
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
||||
|
||||
-- Preview substitutions live, as you type!
|
||||
vim.opt.inccommand = 'split'
|
||||
|
||||
-- Show which line your cursor is on
|
||||
vim.opt.cursorline = true
|
||||
|
||||
-- Minimal number of screen lines to keep above and below the cursor.
|
||||
vim.opt.scrolloff = 10
|
||||
|
||||
-- vim: ts=2 sts=2 sw=2 et
|
|
@ -3,4 +3,6 @@
|
|||
if [[ ! "$-" =~ i ]]; then
|
||||
LOAD_EXIT=1
|
||||
echo "Non interactive session ($-) , stopping load of shell environment" 1>&2
|
||||
else
|
||||
reset
|
||||
fi
|
||||
|
|
|
@ -10,3 +10,6 @@ done
|
|||
NEWPATH="$NEWPATH:$OLDPATH"
|
||||
export PATH="$NEWPATH"
|
||||
unset NEWPATH OLDPATH colon entry search
|
||||
|
||||
[[ -n "${DBG}" ]] && echo "${PATH//:/\n}"
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"'
|
||||
|
||||
alias l='ls -lAhF --color=auto --group-directories-first '
|
||||
alias l='ls -lahF --color=auto --group-directories-first '
|
||||
alias lu='l -U '
|
||||
alias lold='l --sort=time '
|
||||
alias lnew='l --sort=time --reverse '
|
||||
alias ll='l'
|
||||
alias ll='l -A'
|
||||
|
||||
alias sudo='sudo '
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
#!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"'
|
||||
|
||||
[ -s "$HOME/.config/envman/load.sh" ] && source "$HOME/.config/envman/load.sh"
|
||||
export ENVMAN_LOAD=''
|
||||
|
||||
if [ -s "$HOME/.config/envman/load.sh" ]; then
|
||||
[[ -n "${DBG}" ]] && echo "Loading envman"
|
||||
source "$HOME/.config/envman/load.sh"
|
||||
|
||||
[[ -n "${DBG}" ]] && echo "${PATH//:/\n}"
|
||||
fi
|
||||
|
||||
if is_cmd webi; then
|
||||
. <(webi --init "${SHELL##*/}")
|
||||
|
|
|
@ -57,6 +57,9 @@ if is_sourced; then
|
|||
-exec sh -c '
|
||||
find "$1" -xdev -maxdepth 1 -type f -name "*.env" -not -name "ID_*" -not -name "PATH_*" -print | sort
|
||||
' shell '{}' ';' \
|
||||
-exec sh -c '
|
||||
find "$1" -xdev -maxdepth 1 -type f -name "PATH_zz_cleanup.env"
|
||||
' shell '{}' ';' \
|
||||
| sed -e 's/^/load_next "/; s/$/";/'
|
||||
)"
|
||||
if [ -n "$DBG_NO_SZ_LOAD" ]; then
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"'
|
||||
|
||||
if is_cmd fix-kubectl; then
|
||||
. <( fix-kubectl - )
|
||||
if is_cmd szetup-kubectl4k3s && [ "$(systemctl is-active k3s.service)" = "active" ]; then
|
||||
. <( szetup-kubectl4k3s - )
|
||||
|
||||
[[ -n "${DBG}" ]] && echo "kubectl for k3s setup complete."
|
||||
fi
|
||||
|
|
|
@ -5,6 +5,14 @@ if is_cmd midclt; then
|
|||
if [ -e "$SCALE_POOL_ROOT/jailmaker/jlmkr.py" ]; then
|
||||
#alias jlmkr="bash -c '_jlmkr() { $SCALE_POOL_ROOT/jailmaker/jlmkr.py \${@:---help}; }; _jlmkr \$@' "
|
||||
function jlmkr() { sudo $SCALE_POOL_ROOT/jailmaker/jlmkr.py "${@:---help}"; }
|
||||
|
||||
jlmkr-zellij() {
|
||||
zellij action go-to-tab-name --create "jailmkr"
|
||||
zellij action new-pane --name "${1:?must pass jail name}@jlmkr" -- sh -ci "reset; sudo $SCALE_POOL_ROOT/jailmaker/jlmkr.py shell --uid ${UID} ${1}"
|
||||
zellij action focus-previous-pane
|
||||
zellij action close-pane
|
||||
}
|
||||
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -15,9 +15,9 @@ BASE_SHELL=$(basename "$SHELL")
|
|||
|
||||
if is_sourced; then
|
||||
zellij-cleanup() {
|
||||
[[ -r "$HOME/bin/zellij" ]] && rm "$HOME/bin/zellij"
|
||||
[[ -d "$HOME/.cache/zellij" ]] && rm -fR "$HOME/.cache/zellij"
|
||||
[[ -d /tmp/zellij ]] && rm -fR /tmp/zellij
|
||||
type -pa zellij > /dev/null && type -pa zellij | sed -Ee 's/^.* is //' | awk '{ print $1 }' | grep -E "^$HOME" | xargs -tr rm
|
||||
[[ -d "$HOME/.cache/zellij" ]] && echo "$HOME/.cache/zellij" | xargs -rt rm -fR
|
||||
find /tmp -maxdepth 1 -mindepth 1 -type d -name 'zellij*' -print0 | xargs -r0t rm -fR
|
||||
printf 'Zellij has been cleaned up, you can now reinstall it.\n'
|
||||
}
|
||||
zellij() {
|
||||
|
@ -38,11 +38,14 @@ if is_sourced; then
|
|||
fi
|
||||
|
||||
}
|
||||
zellij-completion() {
|
||||
if [[ "${BASE_SHELL}" == "zsh" ]]; then
|
||||
. <( zellij setup --generate-completion zsh | sed -Ee 's/^(_(zellij) ).*/compdef \1\2/' )
|
||||
else
|
||||
. <( zellij setup --generate-completion "$BASE_SHELL" )
|
||||
fi
|
||||
}
|
||||
zellij-completion
|
||||
# Was needed when zsh would load
|
||||
# . <( zellij setup --generate-completion "$BASE_SHELL" | sed -ne '/^function/,$p' )
|
||||
if [[ -z "$ZELLIJ_SESSION_NAME" ]]; then
|
||||
|
|
Loading…
Reference in New Issue