diff --git a/nvim/.config/nvim/.luacheckrc b/nvim/.config/nvim/.luacheckrc index 1d8367d..f5cda50 100644 --- a/nvim/.config/nvim/.luacheckrc +++ b/nvim/.config/nvim/.luacheckrc @@ -1,6 +1,15 @@ -globals = { - "vim", +-- Rerun tests only if their modification time changed. +cache = true + +ignore = { + "122", -- Setting a read-only field of a global variable. + "212", -- Unused argument, In the case of callback function, _arg_name is easier to understand than _, so this option is set to off. } + +-- Global objects defined by the C code read_globals = { + "vim", "Snacks", } + +files["snippets/*.lua"] = { ignore = { "211", "631" } } diff --git a/nvim/.config/nvim/lua/plugins/completion.lua b/nvim/.config/nvim/lua/plugins/completion.lua index 3acbf85..412f92f 100644 --- a/nvim/.config/nvim/lua/plugins/completion.lua +++ b/nvim/.config/nvim/lua/plugins/completion.lua @@ -10,23 +10,20 @@ return { config = function() local ls = require("luasnip") local snippets_folder = vim.fn.stdpath("config") .. "/snippets" - local function load_snippets() - -- Load all Lua files in the snippets directory except init.lua - local files = vim.fn.glob(snippets_folder .. "/*.lua", false, true) - for _, file in ipairs(files) do - local filename = vim.fn.fnamemodify(file, ":t") - -- Remove .lua extension to get the filetype - local ft = filename:match("(.+)%.lua$") - if ft then - -- Load the file which should return a table of snippets - local ok, snippets = pcall(dofile, file) - if ok and type(snippets) == "table" then - ls.add_snippets(ft, snippets) - end + -- Load all Lua files in the snippets directory except init.lua + local files = vim.fn.glob(snippets_folder .. "/*.lua", false, true) + for _, file in ipairs(files) do + local filename = vim.fn.fnamemodify(file, ":t") + -- Remove .lua extension to get the filetype + local ft = filename:match("(.+)%.lua$") + if ft then + -- Load the file which should return a table of snippets + local ok, snippets = pcall(dofile, file) + if ok and type(snippets) == "table" then + ls.add_snippets(ft, snippets) end end end - load_snippets() end, }, { diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 7963e52..f384a15 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -30,6 +30,8 @@ bind-key -n C-S-Left swap-window -t -1\; select-window -t -1 bind-key -n C-S-Right swap-window -t +1\; select-window -t +1 setw -g mode-keys vi +bind-key -T copy-mode-vi v send-keys -X begin-selection +bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel set -g set-clipboard on set -g focus-events on diff --git a/zsh/.zsh_aliases b/zsh/.zsh_aliases index d9cd9f6..691a24b 100644 --- a/zsh/.zsh_aliases +++ b/zsh/.zsh_aliases @@ -101,10 +101,10 @@ alias tfp="tf plan -lock=false" alias tfa="tf apply" alias tfu="tf get -update" alias tg="_terra_cmd terragrunt" -alias tgi="tg grunt init" -alias tgp="tg grunt plan -lock=false" -alias tga="tg grunt apply" -alias tgu="tg grunt get -update" +alias tgi="tg init" +alias tgp="tg plan -lock=false" +alias tga="tg apply" +alias tgu="tg get -update" alias curltime="curl -w \"@$HOME/.curl-format.txt\" -o /dev/null -s "