fix alias and copy-mode
This commit is contained in:
@@ -1,6 +1,15 @@
|
|||||||
globals = {
|
-- Rerun tests only if their modification time changed.
|
||||||
"vim",
|
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 = {
|
read_globals = {
|
||||||
|
"vim",
|
||||||
"Snacks",
|
"Snacks",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
files["snippets/*.lua"] = { ignore = { "211", "631" } }
|
||||||
|
|||||||
@@ -10,23 +10,20 @@ return {
|
|||||||
config = function()
|
config = function()
|
||||||
local ls = require("luasnip")
|
local ls = require("luasnip")
|
||||||
local snippets_folder = vim.fn.stdpath("config") .. "/snippets"
|
local snippets_folder = vim.fn.stdpath("config") .. "/snippets"
|
||||||
local function load_snippets()
|
-- Load all Lua files in the snippets directory except init.lua
|
||||||
-- Load all Lua files in the snippets directory except init.lua
|
local files = vim.fn.glob(snippets_folder .. "/*.lua", false, true)
|
||||||
local files = vim.fn.glob(snippets_folder .. "/*.lua", false, true)
|
for _, file in ipairs(files) do
|
||||||
for _, file in ipairs(files) do
|
local filename = vim.fn.fnamemodify(file, ":t")
|
||||||
local filename = vim.fn.fnamemodify(file, ":t")
|
-- Remove .lua extension to get the filetype
|
||||||
-- Remove .lua extension to get the filetype
|
local ft = filename:match("(.+)%.lua$")
|
||||||
local ft = filename:match("(.+)%.lua$")
|
if ft then
|
||||||
if ft then
|
-- Load the file which should return a table of snippets
|
||||||
-- Load the file which should return a table of snippets
|
local ok, snippets = pcall(dofile, file)
|
||||||
local ok, snippets = pcall(dofile, file)
|
if ok and type(snippets) == "table" then
|
||||||
if ok and type(snippets) == "table" then
|
ls.add_snippets(ft, snippets)
|
||||||
ls.add_snippets(ft, snippets)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
load_snippets()
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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
|
bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
|
||||||
|
|
||||||
setw -g mode-keys vi
|
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 set-clipboard on
|
||||||
set -g focus-events on
|
set -g focus-events on
|
||||||
|
|||||||
@@ -101,10 +101,10 @@ alias tfp="tf plan -lock=false"
|
|||||||
alias tfa="tf apply"
|
alias tfa="tf apply"
|
||||||
alias tfu="tf get -update"
|
alias tfu="tf get -update"
|
||||||
alias tg="_terra_cmd terragrunt"
|
alias tg="_terra_cmd terragrunt"
|
||||||
alias tgi="tg grunt init"
|
alias tgi="tg init"
|
||||||
alias tgp="tg grunt plan -lock=false"
|
alias tgp="tg plan -lock=false"
|
||||||
alias tga="tg grunt apply"
|
alias tga="tg apply"
|
||||||
alias tgu="tg grunt get -update"
|
alias tgu="tg get -update"
|
||||||
|
|
||||||
alias curltime="curl -w \"@$HOME/.curl-format.txt\" -o /dev/null -s "
|
alias curltime="curl -w \"@$HOME/.curl-format.txt\" -o /dev/null -s "
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user