mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-27 22:45:27 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| efc53fc9bf | |||
|
|
f62c17d940 | ||
|
|
fb15b93887 | ||
|
|
222276486a | ||
|
|
4446d59e73 | ||
| a22709a0f0 | |||
| 76598ad33b | |||
| 56ccb7c136 | |||
|
|
b6d933d018 |
2
.github/workflows/pre-commit-autoupdate.yml
vendored
2
.github/workflows/pre-commit-autoupdate.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5.3.0
|
||||
- uses: actions/setup-python@v5.4.0
|
||||
- run: pip install pre-commit && pre-commit autoupdate
|
||||
- uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
|
||||
23
.github/workflows/sync-labels.yml
vendored
Normal file
23
.github/workflows/sync-labels.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
name: Sync labels
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- .github/workflows/sync-labels.yml
|
||||
- .github/labels.yml
|
||||
schedule:
|
||||
- cron: "34 5 * * *"
|
||||
workflow_call:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
SyncLabels:
|
||||
permissions:
|
||||
issues: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: ivuorinen/actions/sync-labels@main
|
||||
@@ -23,7 +23,7 @@ repos:
|
||||
args: [--autofix, --no-sort-keys]
|
||||
|
||||
- repo: https://github.com/igorshubovych/markdownlint-cli
|
||||
rev: v0.43.0
|
||||
rev: v0.44.0
|
||||
hooks:
|
||||
- id: markdownlint
|
||||
args: [-c, .markdownlint.json, --fix]
|
||||
@@ -49,7 +49,7 @@ repos:
|
||||
- id: actionlint
|
||||
|
||||
- repo: https://github.com/renovatebot/pre-commit-hooks
|
||||
rev: 39.117.2
|
||||
rev: 39.156.1
|
||||
hooks:
|
||||
- id: renovate-config-validator
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ git submodule add --name tmux/tmux-dark-notify \
|
||||
# Takes submodules and sets them to ignore all changes
|
||||
for MODULE in $(git config --file .gitmodules --get-regexp path | awk '{ print $2 }'); do
|
||||
echo "Ignoring submodule changes for submodule.${MODULE}..."
|
||||
git config "submodule.${MODULE}.ignore" all
|
||||
git config "submodule.${MODULE}.ignore" "dirty"
|
||||
done
|
||||
|
||||
# Mark certain repositories shallow
|
||||
|
||||
@@ -93,11 +93,12 @@ autocmd({ 'FileType' }, {
|
||||
|
||||
-- Set filetype for SSH config directory
|
||||
-- Pattern handles directories with files like:
|
||||
-- .dotfiles/ssh/config.d/*, .ssh/config.local, .ssh/config.work
|
||||
-- .dotfiles/ssh/config.d/*, .ssh/config.local, .ssh/config.work,
|
||||
-- .ssh/shared.d/*, .ssh/local.d/*
|
||||
autocmd({ 'BufRead', 'BufNewFile' }, {
|
||||
desc = 'Set filetype for SSH config directory',
|
||||
pattern = {
|
||||
'*/?.ssh/{config|shared}.d/*',
|
||||
'*/?.ssh/{config|shared|local}.d/*',
|
||||
'*/?.ssh/config.local',
|
||||
'*/?.ssh/config.work',
|
||||
},
|
||||
|
||||
@@ -18,11 +18,14 @@ return {
|
||||
},
|
||||
},
|
||||
|
||||
{ 'L3MON4D3/LuaSnip', version = 'v2.*' },
|
||||
{ 'L3MON4D3/LuaSnip', version = 'v2.*', build = 'make install_jsregexp' },
|
||||
|
||||
-- Set of preconfigured snippets for different languages.
|
||||
-- https://github.com/rafamadriz/friendly-snippets
|
||||
{ 'rafamadriz/friendly-snippets' },
|
||||
{
|
||||
'rafamadriz/friendly-snippets',
|
||||
config = function() require('luasnip.loaders.from_vscode').lazy_load() end,
|
||||
},
|
||||
|
||||
-- Lua plugin to turn github copilot into a cmp source
|
||||
-- https://github.com/giuxtaposition/blink-cmp-copilot
|
||||
|
||||
@@ -148,70 +148,61 @@ return {
|
||||
-- https://github.com/Bilal2453/luvit-meta
|
||||
{ 'Bilal2453/luvit-meta', lazy = true },
|
||||
|
||||
-- Quickstart configs for Nvim LSP
|
||||
-- https://github.com/neovim/nvim-lspconfig
|
||||
{ 'neovim/nvim-lspconfig' },
|
||||
|
||||
-- Portable package manager for Neovim that runs everywhere Neovim runs.
|
||||
-- Easily install and manage LSP servers, DAP servers, linters, and formatters.
|
||||
-- https://github.com/williamboman/mason.nvim
|
||||
{
|
||||
'williamboman/mason.nvim',
|
||||
version = '*',
|
||||
cmd = 'Mason',
|
||||
run = ':MasonUpdate',
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- Extensible UI for Neovim notifications and LSP progress messages.
|
||||
-- https://github.com/j-hui/fidget.nvim
|
||||
{
|
||||
'j-hui/fidget.nvim',
|
||||
version = '*',
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- Extension to mason.nvim that makes it easier to use lspconfig with mason.nvim.
|
||||
-- https://github.com/williamboman/mason-lspconfig.nvim
|
||||
{ 'williamboman/mason-lspconfig.nvim' },
|
||||
|
||||
-- Install and upgrade third party tools automatically
|
||||
-- https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim
|
||||
{
|
||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||
version = '*',
|
||||
opts = {
|
||||
auto_install = true,
|
||||
auto_update = true,
|
||||
ensure_installed = mason_tools,
|
||||
},
|
||||
},
|
||||
|
||||
-- JSON schemas for Neovim
|
||||
-- https://github.com/b0o/SchemaStore.nvim
|
||||
{ 'b0o/schemastore.nvim' },
|
||||
|
||||
-- Performant, batteries-included completion plugin for Neovim
|
||||
-- https://github.com/saghen/blink.cmp
|
||||
-- See lua/plugins/blink.lua for configs
|
||||
{ 'saghen/blink.cmp' },
|
||||
|
||||
-- A simple wrapper for nvim-lspconfig and mason-lspconfig
|
||||
-- to easily setup LSP servers.
|
||||
-- https://github.com/junnplus/lsp-setup.nvim
|
||||
{
|
||||
'junnplus/lsp-setup.nvim',
|
||||
dependencies = {
|
||||
-- Quickstart configs for Nvim LSP
|
||||
-- https://github.com/neovim/nvim-lspconfig
|
||||
{ 'neovim/nvim-lspconfig' },
|
||||
|
||||
-- Portable package manager for Neovim that runs everywhere Neovim runs.
|
||||
-- Easily install and manage LSP servers, DAP servers, linters, and formatters.
|
||||
-- https://github.com/williamboman/mason.nvim
|
||||
{
|
||||
'williamboman/mason.nvim',
|
||||
version = '*',
|
||||
cmd = 'Mason',
|
||||
run = ':MasonUpdate',
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- Extensible UI for Neovim notifications and LSP progress messages.
|
||||
-- https://github.com/j-hui/fidget.nvim
|
||||
{
|
||||
'j-hui/fidget.nvim',
|
||||
version = '*',
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- Extension to mason.nvim that makes it easier to use lspconfig with mason.nvim.
|
||||
-- https://github.com/williamboman/mason-lspconfig.nvim
|
||||
{ 'williamboman/mason-lspconfig.nvim' },
|
||||
|
||||
-- Install and upgrade third party tools automatically
|
||||
-- https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim
|
||||
{
|
||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||
version = '*',
|
||||
opts = {
|
||||
auto_install = true,
|
||||
auto_update = true,
|
||||
ensure_installed = mason_tools,
|
||||
},
|
||||
},
|
||||
|
||||
-- JSON schemas for Neovim
|
||||
-- https://github.com/b0o/SchemaStore.nvim
|
||||
{ 'b0o/schemastore.nvim' },
|
||||
|
||||
-- Performant, batteries-included completion plugin for Neovim
|
||||
-- https://github.com/saghen/blink.cmp
|
||||
-- See lua/plugins/blink.lua for configs
|
||||
{ 'saghen/blink.cmp' },
|
||||
},
|
||||
opts = {
|
||||
default_mappings = false,
|
||||
mappings = {
|
||||
gd = 'lua require"telescope.builtin".lsp_definitions()',
|
||||
gi = 'lua require"telescope.builtin".lsp_implementations()',
|
||||
gr = 'lua require"telescope.builtin".lsp_references()',
|
||||
},
|
||||
inlay_hints = {
|
||||
enabled = true,
|
||||
},
|
||||
servers = lsp_servers,
|
||||
},
|
||||
config = function(_, opts)
|
||||
@@ -315,16 +306,6 @@ return {
|
||||
'stevearc/conform.nvim',
|
||||
event = { 'BufWritePre' },
|
||||
cmd = { 'ConformInfo' },
|
||||
keys = {
|
||||
{
|
||||
'<leader>cf',
|
||||
function()
|
||||
require('conform').format { async = true, lsp_format = 'fallback' }
|
||||
end,
|
||||
mode = '',
|
||||
desc = 'Format buffer',
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
notify_on_error = false,
|
||||
---@type nil|conform.FormatOpts|fun(bufnr: integer): nil|conform.FormatOpts
|
||||
@@ -340,9 +321,9 @@ return {
|
||||
lsp_format_opt = 'fallback'
|
||||
end
|
||||
|
||||
-- Disable autoformat for files in a certain path
|
||||
-- Disable autoformat for files in a certain paths
|
||||
local bufname = vim.api.nvim_buf_get_name(bufnr)
|
||||
if bufname:match '/node_modules/' then return end
|
||||
if bufname:match '/node_modules|vendor/' then return end
|
||||
|
||||
return {
|
||||
timeout_ms = 500,
|
||||
|
||||
1
config/tmux/.ignore
Normal file
1
config/tmux/.ignore
Normal file
@@ -0,0 +1 @@
|
||||
plugins/*
|
||||
@@ -40,6 +40,8 @@ run-shell "$TMUX_PLUGINS/tmux-sensible/sensible.tmux"
|
||||
run-shell "$TMUX_PLUGINS/tmux-window-name/tmux_window_name.tmux"
|
||||
run-shell "$TMUX_PLUGINS/tmux-mode-indicator/mode_indicator.tmux"
|
||||
run-shell "$TMUX_PLUGINS/tmux-suspend/suspend.tmux"
|
||||
run-shell "$TMUX_PLUGINS/tmux-continuum/continuum.tmux"
|
||||
run-shell "$TMUX_PLUGINS/tmux-sessionist/sessionist.tmux"
|
||||
run-shell "$TMUX_PLUGINS/tmux-yank/yank.tmux"
|
||||
run-shell "$TMUX_PLUGINS/tmux-current-pane-hostname/current_pane_hostname.tmux"
|
||||
run-shell "$TMUX_PLUGINS/tmux-dark-notify/main.tmux"
|
||||
|
||||
@@ -180,8 +180,6 @@ n <Space>tmc * <Cmd>setlocal cursorline! cursorline?<CR>
|
||||
Toggle 'cursorline'
|
||||
n <Space>tmb * <Cmd>lua vim.o.bg = vim.o.bg == "dark" and "light" or "dark"; print(vim.o.bg)<CR>
|
||||
Toggle 'background'
|
||||
os <Space>cf * ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua
|
||||
Format buffer
|
||||
x # * vim/_defaults.lua
|
||||
:help v_#-default
|
||||
o % <Plug>(MatchitOperationForward)
|
||||
@@ -190,9 +188,9 @@ n % <Plug>(MatchitNormalForward)
|
||||
n & * :&&<CR>
|
||||
:help &-default
|
||||
n '? & :<C-U>echo ":Start" dispatch#start_focus(v:count > 1 ? 0 : v:count ? line(".") : -1)<CR>
|
||||
n '! & <SNR>10_:.Start!
|
||||
n '<Space> & <SNR>10_:.Start<Space>
|
||||
n '<CR> & <SNR>10_:.Start<CR>
|
||||
n '! & <SNR>28_:.Start!
|
||||
n '<Space> & <SNR>28_:.Start<Space>
|
||||
n '<CR> & <SNR>28_:.Start<CR>
|
||||
x * * vim/_defaults.lua
|
||||
:help v_star-default
|
||||
v < * <gv
|
||||
@@ -267,10 +265,10 @@ n ]h * <Cmd>lua MiniDiff.goto_hunk('next')<CR>
|
||||
Next hunk
|
||||
n ]d * vim/_defaults.lua
|
||||
Jump to the next diagnostic
|
||||
n `? & <SNR>10_:.FocusDispatch<CR>
|
||||
n `! & <SNR>10_:.Dispatch!
|
||||
n `<Space> & <SNR>10_:.Dispatch<Space>
|
||||
n `<CR> & <SNR>10_:.Dispatch<CR>
|
||||
n `? & <SNR>28_:.FocusDispatch<CR>
|
||||
n `! & <SNR>28_:.Dispatch!
|
||||
n `<Space> & <SNR>28_:.Dispatch<Space>
|
||||
n `<CR> & <SNR>28_:.Dispatch<CR>
|
||||
x a% <Plug>(MatchitVisualTextObject)
|
||||
o ax <Plug>(textobj-xmlattr-attr-a)
|
||||
x ax <Plug>(textobj-xmlattr-attr-a)
|
||||
@@ -284,13 +282,13 @@ o g% <Plug>(MatchitOperationBackward)
|
||||
x g% <Plug>(MatchitVisualBackward)
|
||||
n g% <Plug>(MatchitNormalBackward)
|
||||
n g`? & :<C-U>echo ":Spawn" dispatch#spawn_focus(v:count > 1 ? 0 : v:count ? line(".") : -1)<CR>
|
||||
n g`! & <SNR>10_:.Spawn!
|
||||
n g`<Space> & <SNR>10_:.Spawn<Space>
|
||||
n g`<CR> & <SNR>10_:.Spawn<CR>
|
||||
n g`! & <SNR>28_:.Spawn!
|
||||
n g`<Space> & <SNR>28_:.Spawn<Space>
|
||||
n g`<CR> & <SNR>28_:.Spawn<CR>
|
||||
n g'? & :<C-U>echo ":Spawn" dispatch#spawn_focus(v:count > 1 ? 0 : v:count ? line(".") : -1)<CR>
|
||||
n g'! & <SNR>10_:.Spawn!
|
||||
n g'<Space> & <SNR>10_:.Spawn<Space>
|
||||
n g'<CR> & <SNR>10_:.Spawn<CR>
|
||||
n g'! & <SNR>28_:.Spawn!
|
||||
n g'<Space> & <SNR>28_:.Spawn<Space>
|
||||
n g'<CR> & <SNR>28_:.Spawn<CR>
|
||||
x gS * :<C-U>lua MiniSplitjoin.toggle({ region = MiniSplitjoin.get_visual_region() })<CR>
|
||||
Toggle arguments
|
||||
n gS * v:lua.MiniSplitjoin.operator("toggle") . " "
|
||||
@@ -372,9 +370,9 @@ x k * v:count == 0 ? 'gk' : 'k'
|
||||
n k * v:count == 0 ? 'gk' : 'k'
|
||||
Move up
|
||||
n m? & :<C-U>echo ":Dispatch" dispatch#make_focus(v:count > 1 ? 0 : v:count ? line(".") : -1)<CR>
|
||||
n m! & <SNR>10_:.Make!
|
||||
n m<Space> & <SNR>10_:.Make<Space>
|
||||
n m<CR> & <SNR>10_:.Make<CR>
|
||||
n m! & <SNR>28_:.Make!
|
||||
n m<Space> & <SNR>28_:.Make<Space>
|
||||
n m<CR> & <SNR>28_:.Make<CR>
|
||||
n shn * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/surround.lua
|
||||
Highlight next surrounding
|
||||
n sFn * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/surround.lua
|
||||
@@ -458,6 +456,14 @@ x <Plug>(MatchitVisualBackward) * :<C-U>call matchit#Match_wrapper('',0,'v')<CR
|
||||
x <Plug>(MatchitVisualForward) * :<C-U>call matchit#Match_wrapper('',1,'v')<CR>:if col("''") != col("$") | exe ":normal! m'" | endif<CR>gv``
|
||||
n <Plug>(MatchitNormalBackward) * :<C-U>call matchit#Match_wrapper('',0,'n')<CR>
|
||||
n <Plug>(MatchitNormalForward) * :<C-U>call matchit#Match_wrapper('',1,'n')<CR>
|
||||
o <Plug>(textobj-xmlattr-attr-i) & <SNR>34_(save-cursor-pos):<C-U>call g:__textobj_xmlattr.do_by_pattern("select","attr-i","o")<CR>
|
||||
v <Plug>(textobj-xmlattr-attr-i) & <SNR>34_(save-cursor-pos):<C-U>call g:__textobj_xmlattr.do_by_pattern("select","attr-i","v")<CR>
|
||||
o <Plug>(textobj-xmlattr-attr-a) & <SNR>34_(save-cursor-pos):<C-U>call g:__textobj_xmlattr.do_by_pattern("select","attr-a","o")<CR>
|
||||
v <Plug>(textobj-xmlattr-attr-a) & <SNR>34_(save-cursor-pos):<C-U>call g:__textobj_xmlattr.do_by_pattern("select","attr-a","v")<CR>
|
||||
n <SNR>34_ * <SNR>34_
|
||||
<SNR>34_(save-cursor-pos) * <SNR>34_save_cursor_pos()
|
||||
n <SNR>28_:. & :<C-R>=getcmdline() =~ ',' ? "\0250" : ""<CR>
|
||||
n <Plug>PlenaryTestFile * :lua require('plenary.test_harness').test_file(vim.fn.expand("%:p"))<CR>
|
||||
s <Plug>luasnip-jump-prev * ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua
|
||||
LuaSnip: Jump to the previous node
|
||||
s <Plug>luasnip-jump-next * ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua
|
||||
@@ -474,14 +480,6 @@ s <Plug>luasnip-expand-or-jump * ~/.local/share/nvim/lazy/LuaSnip/plugin/luasni
|
||||
LuaSnip: Repeat last node expansion
|
||||
n <Plug>luasnip-delete-check * ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua
|
||||
LuaSnip: Removes current snippet from jumplist
|
||||
n <Plug>PlenaryTestFile * :lua require('plenary.test_harness').test_file(vim.fn.expand("%:p"))<CR>
|
||||
o <Plug>(textobj-xmlattr-attr-i) & <SNR>14_(save-cursor-pos):<C-U>call g:__textobj_xmlattr.do_by_pattern("select","attr-i","o")<CR>
|
||||
v <Plug>(textobj-xmlattr-attr-i) & <SNR>14_(save-cursor-pos):<C-U>call g:__textobj_xmlattr.do_by_pattern("select","attr-i","v")<CR>
|
||||
o <Plug>(textobj-xmlattr-attr-a) & <SNR>14_(save-cursor-pos):<C-U>call g:__textobj_xmlattr.do_by_pattern("select","attr-a","o")<CR>
|
||||
v <Plug>(textobj-xmlattr-attr-a) & <SNR>14_(save-cursor-pos):<C-U>call g:__textobj_xmlattr.do_by_pattern("select","attr-a","v")<CR>
|
||||
n <SNR>14_ * <SNR>14_
|
||||
<SNR>14_(save-cursor-pos) * <SNR>14_save_cursor_pos()
|
||||
n <SNR>10_:. & :<C-R>=getcmdline() =~ ',' ? "\0250" : ""<CR>
|
||||
x <C-S> * <Esc><Cmd>silent! update | redraw<CR>
|
||||
Save and go to Normal mode
|
||||
n <C-S> * :w!<CR>
|
||||
@@ -494,4 +492,4 @@ n <C-L> * :lua vim.lsp.buf.signature_help()<CR>
|
||||
Signature
|
||||
```
|
||||
|
||||
- Generated on Tue 21 Jan 2025 15:03:23 EET
|
||||
- Generated on Tue 21 Jan 2025 15:24:13 EET
|
||||
|
||||
Reference in New Issue
Block a user