mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-06 08:57:01 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| abb6de05be | |||
| 60ef48e918 | |||
| e58c79a3c3 | |||
| d47f21286d | |||
| 3f108c9353 | |||
|
|
4a68146786 |
@@ -48,7 +48,7 @@ repos:
|
|||||||
- id: actionlint
|
- id: actionlint
|
||||||
|
|
||||||
- repo: https://github.com/renovatebot/pre-commit-hooks
|
- repo: https://github.com/renovatebot/pre-commit-hooks
|
||||||
rev: 39.70.0
|
rev: 39.72.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: renovate-config-validator
|
- id: renovate-config-validator
|
||||||
|
|
||||||
|
|||||||
163
config/aerospace/aerospace.toml
Normal file
163
config/aerospace/aerospace.toml
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
# Start AeroSpace at login
|
||||||
|
start-at-login = false
|
||||||
|
|
||||||
|
# Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization
|
||||||
|
enable-normalization-flatten-containers = true
|
||||||
|
enable-normalization-opposite-orientation-for-nested-containers = true
|
||||||
|
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/guide#layouts
|
||||||
|
# The 'accordion-padding' specifies the size of accordion padding
|
||||||
|
# You can set 0 to disable the padding feature
|
||||||
|
accordion-padding = 40
|
||||||
|
|
||||||
|
# Possible values: tiles|accordion
|
||||||
|
default-root-container-layout = 'tiles'
|
||||||
|
|
||||||
|
# Possible values: horizontal|vertical|auto
|
||||||
|
# 'auto' means: wide monitor (anything wider than high) gets horizontal orientation,
|
||||||
|
# tall monitor (anything higher than wide) gets vertical orientation
|
||||||
|
default-root-container-orientation = 'auto'
|
||||||
|
|
||||||
|
# Mouse follows focus when focused monitor changes
|
||||||
|
# Drop it from your config, if you don't like this behavior
|
||||||
|
# See https://nikitabobko.github.io/AeroSpace/guide#on-focus-changed-callbacks
|
||||||
|
# See https://nikitabobko.github.io/AeroSpace/commands#move-mouse
|
||||||
|
# Fallback value (if you omit the key): on-focused-monitor-changed = []
|
||||||
|
on-focused-monitor-changed = ['move-mouse monitor-lazy-center']
|
||||||
|
|
||||||
|
# You can effectively turn off macOS "Hide application" (cmd-h) feature by toggling this flag
|
||||||
|
# Useful if you don't use this macOS feature, but accidentally hit cmd-h or cmd-alt-h key
|
||||||
|
# Also see: https://nikitabobko.github.io/AeroSpace/goodness#disable-hide-app
|
||||||
|
automatically-unhide-macos-hidden-apps = true
|
||||||
|
|
||||||
|
# [[on-window-detected]]
|
||||||
|
# if.app-id = 'com.apple.systempreferences'
|
||||||
|
# if.app-name-regex-substring = 'settings'
|
||||||
|
# if.window-title-regex-substring = 'substring'
|
||||||
|
# if.workspace = 'workspace-name'
|
||||||
|
# if.during-aerospace-startup = true
|
||||||
|
# check-further-callbacks = true
|
||||||
|
# run = ['layout floating', 'move-node-to-workspace S'] # The callback itself
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-name-regex-substring = 'ferdium'
|
||||||
|
run = 'layout floating'
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-name-regex-substring = 'finder'
|
||||||
|
run = 'layout floating'
|
||||||
|
|
||||||
|
# Possible values: (qwerty|dvorak)
|
||||||
|
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
|
||||||
|
[key-mapping]
|
||||||
|
preset = 'qwerty'
|
||||||
|
|
||||||
|
# Gaps between windows (inner-*) and between monitor edges (outer-*).
|
||||||
|
# Possible values:
|
||||||
|
# - Constant: gaps.outer.top = 8
|
||||||
|
# - Per monitor: gaps.outer.top = [{ monitor.main = 16 }, { monitor."some-pattern" = 32 }, 24]
|
||||||
|
# In this example, 24 is a default value when there is no match.
|
||||||
|
# Monitor pattern is the same as for 'workspace-to-monitor-force-assignment'.
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/guide#assign-workspaces-to-monitors
|
||||||
|
[gaps]
|
||||||
|
inner.horizontal = 10
|
||||||
|
inner.vertical = 10
|
||||||
|
outer.top = 5
|
||||||
|
outer.right = 10
|
||||||
|
outer.bottom = 5
|
||||||
|
outer.left = 10
|
||||||
|
|
||||||
|
# 'main' binding mode declaration
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
|
||||||
|
# 'main' binding mode must be always presented
|
||||||
|
# Fallback value (if you omit the key): mode.main.binding = {}
|
||||||
|
[mode.main.binding]
|
||||||
|
|
||||||
|
# All possible keys:
|
||||||
|
# - Letters. a, b, c, ..., z
|
||||||
|
# - Numbers. 0, 1, 2, ..., 9
|
||||||
|
# - Keypad numbers. keypad0, keypad1, keypad2, ..., keypad9
|
||||||
|
# - F-keys. f1, f2, ..., f20
|
||||||
|
# - Special keys. minus, equal, period, comma, slash, backslash, quote, semicolon, backtick,
|
||||||
|
# leftSquareBracket, rightSquareBracket, space, enter, esc, backspace, tab
|
||||||
|
# - Keypad special. keypadClear, keypadDecimalMark, keypadDivide, keypadEnter, keypadEqual,
|
||||||
|
# keypadMinus, keypadMultiply, keypadPlus
|
||||||
|
# - Arrows. left, down, up, right
|
||||||
|
|
||||||
|
# All possible modifiers: cmd, alt, ctrl, shift
|
||||||
|
|
||||||
|
# All possible commands: https://nikitabobko.github.io/AeroSpace/commands
|
||||||
|
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/commands#exec-and-forget
|
||||||
|
# You can uncomment the following lines to open up terminal with alt + enter shortcut (like in i3)
|
||||||
|
# alt-enter = '''exec-and-forget osascript -e '
|
||||||
|
# tell application "Terminal"
|
||||||
|
# do script
|
||||||
|
# activate
|
||||||
|
# end tell'
|
||||||
|
# '''
|
||||||
|
|
||||||
|
alt-ctrl-shift-f = 'fullscreen'
|
||||||
|
alt-ctrl-f = 'layout floating'
|
||||||
|
|
||||||
|
alt-shift-left = 'join-with left'
|
||||||
|
alt-shift-down = 'join-with down'
|
||||||
|
alt-shift-up = 'join-with up'
|
||||||
|
alt-shift-right = 'join-with right'
|
||||||
|
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/commands#layout
|
||||||
|
alt-period = 'layout tiles horizontal vertical'
|
||||||
|
alt-comma = 'layout accordion horizontal vertical'
|
||||||
|
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/commands#focus
|
||||||
|
alt-h = 'focus left'
|
||||||
|
alt-j = 'focus down'
|
||||||
|
alt-k = 'focus up'
|
||||||
|
alt-l = 'focus right'
|
||||||
|
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/commands#move
|
||||||
|
alt-shift-h = 'move left'
|
||||||
|
alt-shift-j = 'move down'
|
||||||
|
alt-shift-k = 'move up'
|
||||||
|
alt-shift-l = 'move right'
|
||||||
|
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/commands#resize
|
||||||
|
alt-shift-minus = 'resize smart -50'
|
||||||
|
alt-shift-equal = 'resize smart +50'
|
||||||
|
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
|
||||||
|
alt-1 = 'workspace 1'
|
||||||
|
alt-2 = 'workspace 2'
|
||||||
|
alt-3 = 'workspace 3'
|
||||||
|
alt-4 = 'workspace 4'
|
||||||
|
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
|
||||||
|
alt-shift-1 = 'move-node-to-workspace 1 --focus-follows-window'
|
||||||
|
alt-shift-2 = 'move-node-to-workspace 2 --focus-follows-window'
|
||||||
|
alt-shift-3 = 'move-node-to-workspace 3 --focus-follows-window'
|
||||||
|
alt-shift-4 = 'move-node-to-workspace 4 --focus-follows-window'
|
||||||
|
|
||||||
|
alt-tab = 'workspace-back-and-forth'
|
||||||
|
alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
|
||||||
|
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/commands#mode
|
||||||
|
alt-shift-semicolon = 'mode service'
|
||||||
|
alt-shift-enter = 'mode apps'
|
||||||
|
|
||||||
|
# Taken:
|
||||||
|
# - <alt> + hjkl 1234 ,.
|
||||||
|
# - <alt><shift> + hjkl 1234 -=; <cr> ↑↓←→
|
||||||
|
alt-t = 'exec-and-forget open -a /Applications/Ferdium.app'
|
||||||
|
alt-o = 'exec-and-forget open -a /Applications/Obsidian.app'
|
||||||
|
alt-b = 'exec-and-forget open -a /Applications/Brave Browser.app'
|
||||||
|
|
||||||
|
# 'service' binding mode declaration.
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
|
||||||
|
[mode.service.binding]
|
||||||
|
esc = ['reload-config', 'mode main']
|
||||||
|
r = ['flatten-workspace-tree', 'mode main'] # reset layout
|
||||||
|
f = ['layout floating tiling', 'mode main'] # Toggle between floating and tiling layout
|
||||||
|
backspace = ['close-all-windows-but-current', 'mode main']
|
||||||
|
|
||||||
|
[mode.apps.binding]
|
||||||
|
alt-w = ['exec-and-forget open -a /Applications/WezTerm.app', 'mode main']
|
||||||
@@ -8,8 +8,6 @@
|
|||||||
local g = vim.g -- A table to store global variables
|
local g = vim.g -- A table to store global variables
|
||||||
local o = vim.opt -- A table to store global options
|
local o = vim.opt -- A table to store global options
|
||||||
|
|
||||||
vim.loader.enable() -- Enable the plugin loader
|
|
||||||
|
|
||||||
-- vim.global
|
-- vim.global
|
||||||
g.mapleader = ' ' -- Space as the leader key
|
g.mapleader = ' ' -- Space as the leader key
|
||||||
g.maplocalleader = ' ' -- Space as the local leader key
|
g.maplocalleader = ' ' -- Space as the local leader key
|
||||||
@@ -24,32 +22,22 @@ g.loaded_ruby_provider = 0 -- Disable ruby provider
|
|||||||
g.loaded_java_provider = 0 -- Disable java provider
|
g.loaded_java_provider = 0 -- Disable java provider
|
||||||
|
|
||||||
-- vim.options
|
-- vim.options
|
||||||
o.breakindent = true -- Enable break indent
|
-- Most of the good defaults are provided by `mini.basics`
|
||||||
o.completeopt = 'menuone,noselect' -- Popup menu when typing
|
-- See: lua/plugins/mini.lua
|
||||||
o.cursorline = true -- Show which line your cursor is on
|
o.ignorecase = true -- Ignore case in search patterns
|
||||||
o.inccommand = 'split' -- Preview substitutions live, as you type!
|
o.inccommand = 'split' -- Preview substitutions live, as you type!
|
||||||
o.mouse = 'a' -- Enable mouse support
|
|
||||||
o.number = true -- Show line numbers
|
o.number = true -- Show line numbers
|
||||||
o.numberwidth = 3 -- Set the width of the number column
|
o.numberwidth = 3 -- Set the width of the number column
|
||||||
o.relativenumber = true -- Show relative line numbers
|
o.relativenumber = true -- Show relative line numbers
|
||||||
o.scrolloff = 15 -- Show context around cursor
|
o.scrolloff = 15 -- Show context around cursor
|
||||||
o.showmode = false -- Don't show mode
|
|
||||||
o.signcolumn = 'yes:3' -- Keep signcolumn on by default
|
o.signcolumn = 'yes:3' -- Keep signcolumn on by default
|
||||||
o.smartindent = true -- Insert indents automatically
|
|
||||||
o.spell = true -- Enable spell checking
|
o.spell = true -- Enable spell checking
|
||||||
o.spelllang = 'en_us' -- Set the spell checking language
|
o.spelllang = 'en_us' -- Set the spell checking language
|
||||||
o.splitbelow = true -- split to the bottom
|
o.splitbelow = true -- split to the bottom
|
||||||
o.splitright = true -- vsplit to the right
|
o.splitright = true -- vsplit to the right
|
||||||
o.termguicolors = true -- Fixes Notify opacity issues
|
o.termguicolors = true -- Enable GUI colors
|
||||||
o.timeoutlen = 250 -- Decrease mapped sequence wait time
|
o.timeoutlen = 250 -- Decrease mapped sequence wait time
|
||||||
o.undofile = true -- Save undo history
|
|
||||||
o.updatetime = 250 -- 250 ms = 2,5 seconds
|
o.updatetime = 250 -- 250 ms = 2,5 seconds
|
||||||
o.ignorecase = true -- Ignore case in search patterns
|
|
||||||
o.smartcase = true -- Override 'ignorecase' if pattern contains upper case chars
|
|
||||||
|
|
||||||
-- List options
|
|
||||||
o.list = true -- Show some invisible characters
|
|
||||||
o.listchars = { tab = '» ', trail = '·', nbsp = '␣' } -- Which invisible chars to show
|
|
||||||
|
|
||||||
-- Enable the colorcolumn
|
-- Enable the colorcolumn
|
||||||
vim.api.nvim_set_option_value('colorcolumn', '+1', { scope = 'global' })
|
vim.api.nvim_set_option_value('colorcolumn', '+1', { scope = 'global' })
|
||||||
|
|||||||
87
config/nvim/lua/plugins/code.lua
Normal file
87
config/nvim/lua/plugins/code.lua
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
return {
|
||||||
|
-- A better annotation generator.
|
||||||
|
-- Supports multiple languages and annotation conventions.
|
||||||
|
-- https://github.com/danymat/neogen
|
||||||
|
{
|
||||||
|
'danymat/neogen',
|
||||||
|
version = '*',
|
||||||
|
opts = { enabled = true, snippet_engine = 'luasnip' },
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Cloak allows you to overlay *'s over defined patterns in defined files.
|
||||||
|
-- https://github.com/laytan/cloak.nvim
|
||||||
|
{
|
||||||
|
'laytan/cloak.nvim',
|
||||||
|
version = '*',
|
||||||
|
opts = {
|
||||||
|
enabled = true,
|
||||||
|
cloak_character = '*',
|
||||||
|
-- The applied highlight group (colors) on the cloaking, see `:h highlight`.
|
||||||
|
highlight_group = 'Comment',
|
||||||
|
patterns = {
|
||||||
|
{
|
||||||
|
-- Match any file starting with ".env".
|
||||||
|
-- This can be a table to match multiple file patterns.
|
||||||
|
file_pattern = {
|
||||||
|
'.env*',
|
||||||
|
'wrangler.toml',
|
||||||
|
'.dev.vars',
|
||||||
|
},
|
||||||
|
-- Match an equals sign and any character after it.
|
||||||
|
-- This can also be a table of patterns to cloak,
|
||||||
|
-- example: cloak_pattern = { ":.+", "-.+" } for yaml files.
|
||||||
|
cloak_pattern = '=.+',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Describe the regexp under the cursor
|
||||||
|
-- https://github.com/bennypowers/nvim-regexplainer
|
||||||
|
{
|
||||||
|
'bennypowers/nvim-regexplainer',
|
||||||
|
event = 'BufEnter',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
'MunifTanjim/nui.nvim',
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
-- automatically show the explainer when the cursor enters a regexp
|
||||||
|
auto = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Clarify and beautify your comments using boxes and lines.
|
||||||
|
-- https://github.com/LudoPinelli/comment-box.nvim
|
||||||
|
{
|
||||||
|
'LudoPinelli/comment-box.nvim',
|
||||||
|
event = 'BufEnter',
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Plugin to improve viewing Markdown files in Neovim
|
||||||
|
-- https://github.com/MeanderingProgrammer/render-markdown.nvim
|
||||||
|
{
|
||||||
|
'MeanderingProgrammer/render-markdown.nvim',
|
||||||
|
event = 'BufEnter',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
'nvim-tree/nvim-web-devicons',
|
||||||
|
},
|
||||||
|
ft = 'markdown',
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'ray-x/go.nvim',
|
||||||
|
dependencies = { -- optional packages
|
||||||
|
'ray-x/guihua.lua',
|
||||||
|
'neovim/nvim-lspconfig',
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
},
|
||||||
|
config = function() require('go').setup() end,
|
||||||
|
event = { 'CmdlineEnter' },
|
||||||
|
ft = { 'go', 'gomod' },
|
||||||
|
build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,28 +1,37 @@
|
|||||||
-- https://github.com/echasnovski/mini.nvim
|
|
||||||
-- https://github.com/echasnovski/mini.nvim/tree/main?tab=readme-ov-file#modules
|
|
||||||
return {
|
return {
|
||||||
-- Presets for common options and mappings
|
-- Library of 40+ independent Lua modules improving overall Neovim
|
||||||
{ 'echasnovski/mini.basics', version = '*' },
|
-- (version 0.8 and higher) experience with minimal effort
|
||||||
|
-- https://github.com/echasnovski/mini.nvim
|
||||||
-- Extend and create a/i textobjects
|
-- https://github.com/echasnovski/mini.nvim/tree/main?tab=readme-ov-file#modules
|
||||||
{ 'echasnovski/mini.ai', version = '*' },
|
|
||||||
|
|
||||||
-- Animate common Neovim actions
|
|
||||||
-- Replaced anuvyklack/windows.nvim
|
|
||||||
{ 'echasnovski/mini.animate', version = '*', opts = {} },
|
|
||||||
|
|
||||||
-- Buffer removing (unshow, delete, wipeout), which saves window layout
|
|
||||||
-- Replaced famiu/bufdelete.nvim
|
|
||||||
{ 'echasnovski/mini.bufremove', version = '*', opts = {} },
|
|
||||||
|
|
||||||
-- Show next key clues
|
|
||||||
-- Replaced folke/which-key.nvim
|
|
||||||
{
|
{
|
||||||
'echasnovski/mini.clue',
|
'echasnovski/mini.nvim',
|
||||||
version = '*',
|
version = '*',
|
||||||
|
priority = 1001,
|
||||||
config = function()
|
config = function()
|
||||||
local miniclue = require 'mini.clue'
|
-- Presets for common options and mappings
|
||||||
|
-- h: MiniBasics.config
|
||||||
|
require('mini.basics').setup {
|
||||||
|
options = {
|
||||||
|
basics = true,
|
||||||
|
extra_ui = true,
|
||||||
|
},
|
||||||
|
mappings = {
|
||||||
|
basic = true,
|
||||||
|
option_toggle_prefix = [[<leader>tm]],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Animate common Neovim actions
|
||||||
|
-- Replaced anuvyklack/windows.nvim
|
||||||
|
require('mini.animate').setup()
|
||||||
|
|
||||||
|
-- Buffer removing (unshow, delete, wipeout), which saves window layout
|
||||||
|
-- Replaced famiu/bufdelete.nvim
|
||||||
|
require('mini.bufremove').setup()
|
||||||
|
|
||||||
|
-- Show next key clues
|
||||||
|
-- Replaced folke/which-key.nvim
|
||||||
|
local miniclue = require 'mini.clue'
|
||||||
miniclue.setup {
|
miniclue.setup {
|
||||||
window = {
|
window = {
|
||||||
config = {
|
config = {
|
||||||
@@ -76,6 +85,7 @@ return {
|
|||||||
{ mode = 'n', keys = '<Leader>q', desc = '+Quit' },
|
{ mode = 'n', keys = '<Leader>q', desc = '+Quit' },
|
||||||
{ mode = 'n', keys = '<Leader>s', desc = '+Telescope' },
|
{ mode = 'n', keys = '<Leader>s', desc = '+Telescope' },
|
||||||
{ mode = 'n', keys = '<Leader>t', desc = '+Toggle' },
|
{ mode = 'n', keys = '<Leader>t', desc = '+Toggle' },
|
||||||
|
{ mode = 'n', keys = '<Leader>tm', desc = '+Mini' },
|
||||||
{ mode = 'n', keys = '<Leader>x', desc = '+Trouble' },
|
{ mode = 'n', keys = '<Leader>x', desc = '+Trouble' },
|
||||||
{ mode = 'n', keys = '<leader>z', desc = '+TreeSitter' },
|
{ mode = 'n', keys = '<leader>z', desc = '+TreeSitter' },
|
||||||
{ mode = 'n', keys = '<leader>zg', desc = '+Goto' },
|
{ mode = 'n', keys = '<leader>zg', desc = '+Goto' },
|
||||||
@@ -84,132 +94,107 @@ return {
|
|||||||
{ mode = 'n', keys = 'y', desc = '+Yank' },
|
{ mode = 'n', keys = 'y', desc = '+Yank' },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Comment lines
|
-- Comment lines
|
||||||
-- Replaced numToStr/Comment.nvim
|
-- Replaced numToStr/Comment.nvim
|
||||||
{ 'echasnovski/mini.comment', version = '*', opts = {} },
|
require('mini.comment').setup()
|
||||||
|
|
||||||
-- Highlight cursor word and its matches
|
-- Highlight cursor word and its matches
|
||||||
{ 'echasnovski/mini.cursorword', version = '*' },
|
require('mini.cursorword').setup()
|
||||||
|
|
||||||
-- Work with diff hunks
|
-- Work with diff hunks
|
||||||
-- Replaced lewis6991/gitsigns.nvim
|
-- Replaced lewis6991/gitsigns.nvim
|
||||||
{ 'echasnovski/mini.diff', version = '*', opts = {} },
|
require('mini.diff').setup()
|
||||||
|
|
||||||
-- Git integration
|
-- Git integration
|
||||||
{
|
require('mini.git').setup()
|
||||||
'echasnovski/mini-git',
|
|
||||||
version = '*',
|
|
||||||
opts = {},
|
|
||||||
main = 'mini.git',
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Highlight patterns in text
|
-- Highlight patterns in text
|
||||||
-- Replaced folke/todo-comments.nvim
|
-- Replaced folke/todo-comments.nvim
|
||||||
{
|
|
||||||
'echasnovski/mini.hipatterns',
|
|
||||||
version = '*',
|
|
||||||
opts = {
|
|
||||||
highlighters = {
|
|
||||||
-- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE', 'BUG', 'PERF' words
|
|
||||||
fixme = {
|
|
||||||
pattern = '%f[%w]()FIXME:?%s*()%f[%W]',
|
|
||||||
group = 'MiniHipatternsFixme',
|
|
||||||
},
|
|
||||||
hack = {
|
|
||||||
pattern = '%f[%w]()HACK:?%s*()%f[%W]',
|
|
||||||
group = 'MiniHipatternsHack',
|
|
||||||
},
|
|
||||||
todo = {
|
|
||||||
pattern = '%f[%w]()NOTE:?%s*()%f[%W]',
|
|
||||||
group = 'MiniHipatternsTodo',
|
|
||||||
},
|
|
||||||
note = {
|
|
||||||
pattern = '%f[%w]()NOTE()%f[%W]',
|
|
||||||
group = 'MiniHipatternsNote',
|
|
||||||
},
|
|
||||||
bug = {
|
|
||||||
pattern = '%f[%w]()BUG:?%s*()%f[%W]',
|
|
||||||
group = 'MiniHipatternsBug',
|
|
||||||
},
|
|
||||||
perf = {
|
|
||||||
pattern = '%f[%w]()PERF:?%s*()%f[%W]',
|
|
||||||
group = 'MiniHipatternsPerf',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function(opts)
|
|
||||||
local hp = require 'mini.hipatterns'
|
local hp = require 'mini.hipatterns'
|
||||||
hp.setup {
|
hp.setup {
|
||||||
highlighters = opts.highlighters,
|
highlighters = {
|
||||||
|
-- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE', 'BUG', 'PERF' words
|
||||||
|
fixme = {
|
||||||
|
pattern = '%f[%w]()FIXME:?%s*()%f[%W]',
|
||||||
|
group = 'MiniHipatternsFixme',
|
||||||
|
},
|
||||||
|
hack = {
|
||||||
|
pattern = '%f[%w]()HACK:?%s*()%f[%W]',
|
||||||
|
group = 'MiniHipatternsHack',
|
||||||
|
},
|
||||||
|
todo = {
|
||||||
|
pattern = '%f[%w]()TODO:?%s*()%f[%W]',
|
||||||
|
group = 'MiniHipatternsNote',
|
||||||
|
},
|
||||||
|
note = {
|
||||||
|
pattern = '%f[%w]()NOTE()%f[%W]',
|
||||||
|
group = 'MiniHipatternsNote',
|
||||||
|
},
|
||||||
|
bug = {
|
||||||
|
pattern = '%f[%w]()BUG:?%s*()%f[%W]',
|
||||||
|
group = 'MiniHipatternsHack',
|
||||||
|
},
|
||||||
|
perf = {
|
||||||
|
pattern = '%f[%w]()PERF:?%s*()%f[%W]',
|
||||||
|
group = 'MiniHipatternsNote',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
-- Highlight hex color strings (`#rrggbb`) using that color
|
-- Highlight hex color strings (`#rrggbb`) using that color
|
||||||
hex_color = hp.gen_highlighter.hex_color(),
|
hex_color = hp.gen_highlighter.hex_color(),
|
||||||
}
|
}
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Icons
|
-- Icons
|
||||||
{
|
require('mini.icons').setup {
|
||||||
'echasnovski/mini.icons',
|
file = {
|
||||||
opts = {
|
['.keep'] = { glyph = '', hl = 'MiniIconsGrey' },
|
||||||
file = {
|
['devcontainer.json'] = { glyph = '', hl = 'MiniIconsAzure' },
|
||||||
['.keep'] = { glyph = '', hl = 'MiniIconsGrey' },
|
},
|
||||||
['devcontainer.json'] = { glyph = '', hl = 'MiniIconsAzure' },
|
filetype = {
|
||||||
},
|
dotenv = { glyph = '', hl = 'MiniIconsYellow' },
|
||||||
filetype = {
|
},
|
||||||
dotenv = { glyph = '', hl = 'MiniIconsYellow' },
|
}
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Visualize and work with indent scope
|
-- Visualize and work with indent scope
|
||||||
-- Replaced lukas-reineke/indent-blankline.nvim
|
-- Replaced lukas-reineke/indent-blankline.nvim
|
||||||
{ 'echasnovski/mini.indentscope', version = '*', opts = {} },
|
require('mini.indentscope').setup()
|
||||||
|
|
||||||
-- Jump to next/previous single character
|
-- Jump to next/previous single character
|
||||||
{
|
require('mini.jump').setup {
|
||||||
'echasnovski/mini.jump',
|
mappings = {
|
||||||
version = '*',
|
forward = 'f',
|
||||||
opts = {
|
backward = 'F',
|
||||||
mappings = {
|
forward_till = 't',
|
||||||
forward = 'f',
|
backward_till = 'T',
|
||||||
backward = 'F',
|
repeat_jump = ';',
|
||||||
forward_till = 't',
|
},
|
||||||
backward_till = 'T',
|
}
|
||||||
repeat_jump = ';',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Move lines and blocks of text
|
-- Move lines and blocks of text
|
||||||
{ 'echasnovski/mini.move', version = '*', opts = {} },
|
require('mini.move').setup()
|
||||||
|
|
||||||
-- Text edit operators
|
-- Text edit operators
|
||||||
{ 'echasnovski/mini.operators', version = '*', opts = {} },
|
-- g= - Evaluate text and replace with output
|
||||||
|
-- gx - Exchange text regions
|
||||||
|
-- gm - Multiply (duplicate) text
|
||||||
|
-- gr - Replace text with register
|
||||||
|
-- gs - Sort text
|
||||||
|
require('mini.operators').setup()
|
||||||
|
|
||||||
-- Session management (read, write, delete)
|
-- Session management (read, write, delete)
|
||||||
{
|
require('mini.sessions').setup {
|
||||||
'echasnovski/mini.sessions',
|
autowrite = true,
|
||||||
version = '*',
|
directory = vim.g.sessions_dir or vim.fn.stdpath 'data' .. '/sessions',
|
||||||
opts = {
|
file = '',
|
||||||
autoread = true,
|
}
|
||||||
autowrite = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Split and join arguments, lists, and other sequences
|
-- Split and join arguments, lists, and other sequences
|
||||||
-- Replaced Wansmer/treesj
|
-- Replaced Wansmer/treesj
|
||||||
{ 'echasnovski/mini.splitjoin', version = '*', opts = {} },
|
require('mini.splitjoin').setup()
|
||||||
|
|
||||||
-- Fast and flexible start screen
|
-- Fast and flexible start screen
|
||||||
-- Replaced glepnir/dashboard-nvim
|
-- Replaced glepnir/dashboard-nvim
|
||||||
{
|
|
||||||
'echasnovski/mini.starter',
|
|
||||||
version = '*',
|
|
||||||
config = function()
|
|
||||||
local starter = require 'mini.starter'
|
local starter = require 'mini.starter'
|
||||||
starter.setup {
|
starter.setup {
|
||||||
items = {
|
items = {
|
||||||
@@ -223,48 +208,43 @@ return {
|
|||||||
starter.gen_hook.aligning('center', 'center'),
|
starter.gen_hook.aligning('center', 'center'),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- Minimal and fast statusline module with opinionated default look
|
||||||
|
-- Replaced nvim-lualine/lualine.nvim
|
||||||
|
local sl = require 'mini.statusline'
|
||||||
|
sl.setup {
|
||||||
|
use_icons = true,
|
||||||
|
set_vim_settings = true,
|
||||||
|
content = {
|
||||||
|
active = function()
|
||||||
|
local mode, mode_hl = sl.section_mode { trunc_width = 120 }
|
||||||
|
local git = sl.section_git { trunc_width = 75 }
|
||||||
|
local diagnostics = sl.section_diagnostics { trunc_width = 75 }
|
||||||
|
local filename = sl.section_filename { trunc_width = 999 }
|
||||||
|
-- local fileinfo = statusline.section_fileinfo({ trunc_width = 120 })
|
||||||
|
local location = sl.section_location { trunc_width = 75 }
|
||||||
|
return sl.combine_groups {
|
||||||
|
{ hl = mode_hl, strings = { mode } },
|
||||||
|
{ hl = 'statuslineDevinfo', strings = { git, diagnostics } },
|
||||||
|
'%<', -- Mark general truncate point
|
||||||
|
{ hl = 'statuslineFilename', strings = { filename } },
|
||||||
|
'%=', -- End left alignment
|
||||||
|
-- { hl = 'statuslineFileinfo', strings = { fileinfo } },
|
||||||
|
{ hl = mode_hl, strings = { location } },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Fast and feature-rich surround actions
|
||||||
|
-- Replaced kylechui/nvim-surround
|
||||||
|
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
|
||||||
|
-- - sd' - [S]urround [D]elete [']quotes
|
||||||
|
-- - sr)' - [S]urround [R]eplace [)] [']
|
||||||
|
require('mini.surround').setup()
|
||||||
|
|
||||||
|
-- Work with trailing whitespace
|
||||||
|
require('mini.trailspace').setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Minimal and fast statusline module with opinionated default look
|
|
||||||
-- Replaced nvim-lualine/lualine.nvim
|
|
||||||
{
|
|
||||||
'echasnovski/mini.statusline',
|
|
||||||
version = '*',
|
|
||||||
opts = {
|
|
||||||
use_icons = true,
|
|
||||||
set_vim_settings = true,
|
|
||||||
content = {
|
|
||||||
active = function()
|
|
||||||
local mode, mode_hl =
|
|
||||||
MiniStatusline.section_mode { trunc_width = 120 }
|
|
||||||
local git = MiniStatusline.section_git { trunc_width = 75 }
|
|
||||||
local diagnostics =
|
|
||||||
MiniStatusline.section_diagnostics { trunc_width = 75 }
|
|
||||||
local filename = MiniStatusline.section_filename { trunc_width = 50 }
|
|
||||||
-- local fileinfo = MiniStatusline.section_fileinfo({ trunc_width = 120 })
|
|
||||||
local location = MiniStatusline.section_location { trunc_width = 75 }
|
|
||||||
return MiniStatusline.combine_groups {
|
|
||||||
{ hl = mode_hl, strings = { mode } },
|
|
||||||
{ hl = 'MiniStatuslineDevinfo', strings = { git, diagnostics } },
|
|
||||||
'%<', -- Mark general truncate point
|
|
||||||
{ hl = 'MiniStatuslineFilename', strings = { filename } },
|
|
||||||
'%=', -- End left alignment
|
|
||||||
-- { hl = 'MiniStatuslineFileinfo', strings = { fileinfo } },
|
|
||||||
{ hl = mode_hl, strings = { location } },
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Fast and feature-rich surround actions
|
|
||||||
-- Replaced kylechui/nvim-surround
|
|
||||||
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
|
|
||||||
-- - sd' - [S]urround [D]elete [']quotes
|
|
||||||
-- - sr)' - [S]urround [R]eplace [)] [']
|
|
||||||
{ 'echasnovski/mini.surround', version = '*', opts = {} },
|
|
||||||
|
|
||||||
-- Work with trailing whitespace
|
|
||||||
{ 'echasnovski/mini.trailspace', version = '*', opts = {} },
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
-- A better annotation generator.
|
|
||||||
-- Supports multiple languages and annotation conventions.
|
|
||||||
-- https://github.com/danymat/neogen
|
|
||||||
return {
|
|
||||||
'danymat/neogen',
|
|
||||||
version = '*',
|
|
||||||
opts = { enabled = true, snippet_engine = 'luasnip' },
|
|
||||||
}
|
|
||||||
@@ -39,71 +39,7 @@ return {
|
|||||||
-- https://github.com/lukas-reineke/virt-column.nvim
|
-- https://github.com/lukas-reineke/virt-column.nvim
|
||||||
{ 'lukas-reineke/virt-column.nvim', opts = {} },
|
{ 'lukas-reineke/virt-column.nvim', opts = {} },
|
||||||
|
|
||||||
-- Cloak allows you to overlay *'s over defined patterns in defined files.
|
|
||||||
-- https://github.com/laytan/cloak.nvim
|
|
||||||
{
|
|
||||||
'laytan/cloak.nvim',
|
|
||||||
version = '*',
|
|
||||||
opts = {
|
|
||||||
enabled = true,
|
|
||||||
cloak_character = '*',
|
|
||||||
-- The applied highlight group (colors) on the cloaking, see `:h highlight`.
|
|
||||||
highlight_group = 'Comment',
|
|
||||||
patterns = {
|
|
||||||
{
|
|
||||||
-- Match any file starting with ".env".
|
|
||||||
-- This can be a table to match multiple file patterns.
|
|
||||||
file_pattern = {
|
|
||||||
'.env*',
|
|
||||||
'wrangler.toml',
|
|
||||||
'.dev.vars',
|
|
||||||
},
|
|
||||||
-- Match an equals sign and any character after it.
|
|
||||||
-- This can also be a table of patterns to cloak,
|
|
||||||
-- example: cloak_pattern = { ":.+", "-.+" } for yaml files.
|
|
||||||
cloak_pattern = '=.+',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Neovim plugin for locking a buffer to a window
|
-- Neovim plugin for locking a buffer to a window
|
||||||
-- https://github.com/stevearc/stickybuf.nvim
|
-- https://github.com/stevearc/stickybuf.nvim
|
||||||
{ 'stevearc/stickybuf.nvim', opts = {} },
|
{ 'stevearc/stickybuf.nvim', opts = {} },
|
||||||
|
|
||||||
-- Describe the regexp under the cursor
|
|
||||||
-- https://github.com/bennypowers/nvim-regexplainer
|
|
||||||
{
|
|
||||||
'bennypowers/nvim-regexplainer',
|
|
||||||
event = 'BufEnter',
|
|
||||||
dependencies = {
|
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
'MunifTanjim/nui.nvim',
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
-- automatically show the explainer when the cursor enters a regexp
|
|
||||||
auto = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Clarify and beautify your comments using boxes and lines.
|
|
||||||
-- https://github.com/LudoPinelli/comment-box.nvim
|
|
||||||
{
|
|
||||||
'LudoPinelli/comment-box.nvim',
|
|
||||||
event = 'BufEnter',
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Plugin to improve viewing Markdown files in Neovim
|
|
||||||
-- https://github.com/MeanderingProgrammer/render-markdown.nvim
|
|
||||||
{
|
|
||||||
'MeanderingProgrammer/render-markdown.nvim',
|
|
||||||
event = 'BufEnter',
|
|
||||||
dependencies = {
|
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
'nvim-tree/nvim-web-devicons',
|
|
||||||
},
|
|
||||||
ft = 'markdown',
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,10 +35,14 @@
|
|||||||
glob: true
|
glob: true
|
||||||
relink: true
|
relink: true
|
||||||
path: config/*
|
path: config/*
|
||||||
exclude: [config/nvm]
|
exclude: [config/nvm, config/fzf]
|
||||||
~/.local/bin:
|
~/.local/bin:
|
||||||
glob: true
|
glob: true
|
||||||
path: local/bin/*
|
path: local/bin/*
|
||||||
|
exclude: [local/bin/fzf]
|
||||||
|
~/.local/fzf:
|
||||||
|
glob: true
|
||||||
|
path: config/fzf/*
|
||||||
~/.local/man:
|
~/.local/man:
|
||||||
glob: true
|
glob: true
|
||||||
path: local/man/**
|
path: local/man/**
|
||||||
@@ -55,5 +59,5 @@
|
|||||||
- bash local/bin/dfm install all
|
- bash local/bin/dfm install all
|
||||||
- pipx:
|
- pipx:
|
||||||
file: tools/requirements-pipx.txt
|
file: tools/requirements-pipx.txt
|
||||||
stdout: false
|
stdout: true
|
||||||
stderr: true
|
stderr: true
|
||||||
|
|||||||
Reference in New Issue
Block a user