Compare commits
1 Commits
master
...
221a1c4a9a
| Author | SHA1 | Date | |
|---|---|---|---|
|
221a1c4a9a
|
@@ -1 +0,0 @@
|
|||||||
../git/dot-local
|
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
tool = nvimdiff
|
tool = nvimdiff
|
||||||
|
|
||||||
[init]
|
[init]
|
||||||
defaultBranch = main
|
defaultBranch = master
|
||||||
|
|
||||||
[rebase]
|
[rebase]
|
||||||
autosquash = true
|
autosquash = true
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ TARGET=$1
|
|||||||
|
|
||||||
if [ -z "$TARGET" ]; then
|
if [ -z "$TARGET" ]; then
|
||||||
if hash fzf 2>/dev/null; then
|
if hash fzf 2>/dev/null; then
|
||||||
TARGET=$(git log -n 50 --pretty=format:'%h %s' --no-merges | fzf --border-label=' Select commit ' | cut -c -7 )
|
TARGET=$(git log -n 50 --pretty=format:'%h %s' --no-merges | fzf --border-label='Select commit' | cut -c -7 )
|
||||||
else
|
else
|
||||||
echo "Not installed: fzf"
|
echo "Not installed: fzf"
|
||||||
exit -1
|
exit -1
|
||||||
|
|||||||
@@ -5,19 +5,18 @@
|
|||||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||||
"bufresize.nvim": { "branch": "master", "commit": "3b19527ab936d6910484dcc20fb59bdb12322d8b" },
|
"bufresize.nvim": { "branch": "master", "commit": "3b19527ab936d6910484dcc20fb59bdb12322d8b" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" },
|
"conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" },
|
||||||
"crates.nvim": { "branch": "main", "commit": "afcd1cc3eeceb5783676fc8464389b9216a29d05" },
|
|
||||||
"eyeliner.nvim": { "branch": "main", "commit": "8f197eb30cecdf4c2cc9988a5eecc6bc34c0c7d6" },
|
"eyeliner.nvim": { "branch": "main", "commit": "8f197eb30cecdf4c2cc9988a5eecc6bc34c0c7d6" },
|
||||||
"fidget.nvim": { "branch": "main", "commit": "4d5858bd4c471c895060e1b9f3575f1551184dc5" },
|
"fidget.nvim": { "branch": "main", "commit": "4d5858bd4c471c895060e1b9f3575f1551184dc5" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "6e3c66548035e50db7bd8e360a29aec6620c3641" },
|
"gitsigns.nvim": { "branch": "main", "commit": "6e3c66548035e50db7bd8e360a29aec6620c3641" },
|
||||||
"gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" },
|
"gruvbox.nvim": { "branch": "main", "commit": "a56f758f9d3eed0b8afbab6ea3ee523887755aed" },
|
||||||
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
|
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
|
||||||
"inc-rename.nvim": { "branch": "main", "commit": "8ae25b35ae16ca4bd5de3d3c472eec3b574018d4" },
|
"inc-rename.nvim": { "branch": "main", "commit": "8ae25b35ae16ca4bd5de3d3c472eec3b574018d4" },
|
||||||
"kubernetes.nvim": { "branch": "main", "commit": "44daf998345628a1a7034e3aaa31f4e05e4dde7c" },
|
"kubernetes.nvim": { "branch": "main", "commit": "44daf998345628a1a7034e3aaa31f4e05e4dde7c" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
|
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
|
"lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "7f9a39fcd2ac6e979001f857727d606888f5909c" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "5e085efe67fccb13372d54331d849219662a7e93" },
|
||||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
|
"mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" },
|
"mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" },
|
||||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "f1deac7ecec88c28a250d890ba7bb35843e69cbd" },
|
"neo-tree.nvim": { "branch": "v3.x", "commit": "f1deac7ecec88c28a250d890ba7bb35843e69cbd" },
|
||||||
@@ -25,27 +24,27 @@
|
|||||||
"nvim-colorizer.lua": { "branch": "master", "commit": "51cf7c995ed1eb6642aecf19067ee634fa1b6ba2" },
|
"nvim-colorizer.lua": { "branch": "master", "commit": "51cf7c995ed1eb6642aecf19067ee634fa1b6ba2" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "b0f983507e3702f073bfe1516846e58b56d4e42f" },
|
"nvim-dap": { "branch": "master", "commit": "b0f983507e3702f073bfe1516846e58b56d4e42f" },
|
||||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "ac98db2f9f06a56498ec890a96928774eae412c3" },
|
"nvim-lspconfig": { "branch": "master", "commit": "3a8d621d74bd9760b9f8dbc4fdfb937bb13d2f49" },
|
||||||
"nvim-surround": { "branch": "main", "commit": "a868c256c861044beb9794b4dd126480dcdfbdad" },
|
"nvim-surround": { "branch": "main", "commit": "a868c256c861044beb9794b4dd126480dcdfbdad" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||||
"peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" },
|
"peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||||
"ros-nvim": { "branch": "main", "commit": "1ad64cd3a1e144dfea67890845f9da2e82d96900" },
|
"ros-nvim": { "branch": "main", "commit": "1ad64cd3a1e144dfea67890845f9da2e82d96900" },
|
||||||
"schema-companion.nvim": { "branch": "main", "commit": "e94f5f8439705d772363817c9d2c6c9fc7562bd0" },
|
"schema-companion.nvim": { "branch": "main", "commit": "b22243d3ca71be08d06a4b9bf200c1d677c41d45" },
|
||||||
"schemastore.nvim": { "branch": "main", "commit": "d522e3ed6ed2c7bed7ebe1e42615e79b3aabfe65" },
|
"schemastore.nvim": { "branch": "main", "commit": "2ae6d27897c60265d4ad3f33e286528d519098fd" },
|
||||||
"scrollEOF.nvim": { "branch": "master", "commit": "aeedfad14e4a0cfa31b44b531c1ad8fd4696b551" },
|
"scrollEOF.nvim": { "branch": "master", "commit": "aeedfad14e4a0cfa31b44b531c1ad8fd4696b551" },
|
||||||
"smart-open.nvim": { "branch": "0.3.x", "commit": "e7f27218bd43de5262d3e8e3e84a135737ca6942" },
|
"smart-open.nvim": { "branch": "0.2.x", "commit": "560d8f16e17977c8303db6f9660db58a4415ca41" },
|
||||||
"smart-splits.nvim": { "branch": "master", "commit": "51e400b0bb6cbfd48e56d1baca250f34028cf1d3" },
|
"smart-splits.nvim": { "branch": "master", "commit": "1ac316e6ea719843fd80716d1105613c98632af1" },
|
||||||
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
||||||
"sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" },
|
"sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" },
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
"telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" },
|
||||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||||
"ultimate-autopair.nvim": { "branch": "v0.6", "commit": "74163ac321c7d208a5bb9cdf8964114c7064d6c7" },
|
"ultimate-autopair.nvim": { "branch": "v0.6", "commit": "2025a181c303cec0fabd4bbdc9d752574ceda2d9" },
|
||||||
"undotree": { "branch": "master", "commit": "fe9a9d0645f0f5532360b5e5f5c550d7bb4f1869" },
|
"undotree": { "branch": "master", "commit": "fe9a9d0645f0f5532360b5e5f5c550d7bb4f1869" },
|
||||||
"which-key.nvim": { "branch": "winborder-support", "commit": "ab1a3b0d3005a95507ba6c18b96531d430370885" }
|
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,8 @@
|
|||||||
return require("schema-companion").setup_client(
|
return {
|
||||||
require("schema-companion").adapters.jsonls.setup({
|
|
||||||
sources = {
|
|
||||||
require("schema-companion").sources.lsp.setup(),
|
|
||||||
require("schema-companion").sources.none.setup(),
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
settings = {
|
settings = {
|
||||||
json = {
|
json = {
|
||||||
validate = { enable = true },
|
validate = { enable = true },
|
||||||
schemas = require("schemastore").json.schemas(),
|
schemas = require("schemastore").json.schemas(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|||||||
@@ -1,23 +1,8 @@
|
|||||||
return {
|
return {
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
workspace = {
|
workspace = { checkThirdParty = false },
|
||||||
checkThirdParty = false,
|
|
||||||
library = {
|
|
||||||
"./definitions",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
telemetry = { enable = false },
|
telemetry = { enable = false },
|
||||||
type = {
|
|
||||||
checkTableShape = true,
|
|
||||||
},
|
|
||||||
diagnostics = {
|
|
||||||
neededFileStatus = {
|
|
||||||
-- ["no-unknown"] = "Opened",
|
|
||||||
-- ["incomplete-signature-doc"] = "Opened",
|
|
||||||
-- ["await-in-sync"] = "Opened",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
return require("schema-companion").setup_client(
|
|
||||||
require("schema-companion").adapters.taplo.setup({
|
|
||||||
sources = {
|
|
||||||
require("schema-companion").sources.lsp.setup(),
|
|
||||||
require("schema-companion").sources.none.setup(),
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
{}
|
|
||||||
)
|
|
||||||
@@ -1,10 +1,5 @@
|
|||||||
return require("schema-companion").setup_client(
|
return require("schema-companion").setup_client({
|
||||||
require("schema-companion").adapters.yamlls.setup({
|
settings = {
|
||||||
sources = {
|
yaml = {},
|
||||||
require("matchers.kubernetes").setup({}),
|
|
||||||
require("schema-companion").sources.lsp.setup(),
|
|
||||||
require("schema-companion").sources.none.setup(),
|
|
||||||
},
|
},
|
||||||
}),
|
})
|
||||||
{}
|
|
||||||
)
|
|
||||||
|
|||||||
@@ -15,16 +15,3 @@ vim.keymap.set("n", "N", "Nzz")
|
|||||||
|
|
||||||
-- Clear search highlight by pressing esc
|
-- Clear search highlight by pressing esc
|
||||||
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
|
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
|
||||||
pattern = { "rust" },
|
|
||||||
callback = function(args)
|
|
||||||
local command = {
|
|
||||||
rust = "cargo run",
|
|
||||||
}
|
|
||||||
vim.keymap.set("n", "<F5>", function()
|
|
||||||
vim.system({ "tmux", "send-keys", "-t", ":shell", "c-u", command[args.match], "Enter" })
|
|
||||||
vim.system({ "tmux", "select-window", "-t", ":shell" })
|
|
||||||
end, { buffer = true })
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|||||||
@@ -148,10 +148,7 @@ vim.api.nvim_create_autocmd("LspAttach", {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Manually enable lsps, if installed
|
-- Manually enable rust analyzer, if installed
|
||||||
if vim.fn.executable("rust_analyzer") then
|
if vim.fn.executable("rust_analyzer") then
|
||||||
vim.lsp.enable("rust_analyzer")
|
vim.lsp.enable("rust_analyzer")
|
||||||
end
|
end
|
||||||
if vim.fn.executable("vtsls") then
|
|
||||||
vim.lsp.enable("vtsls")
|
|
||||||
end
|
|
||||||
|
|||||||
@@ -1,57 +0,0 @@
|
|||||||
---@class schema_companion.Source
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
M.name = "Kubernetes"
|
|
||||||
|
|
||||||
M.config = {}
|
|
||||||
|
|
||||||
---@param config {}
|
|
||||||
---@return schema_companion.Source
|
|
||||||
function M.setup(config)
|
|
||||||
setmetatable(M, {})
|
|
||||||
M.config = vim.tbl_deep_extend("force", {}, M.config, config)
|
|
||||||
|
|
||||||
return M
|
|
||||||
end
|
|
||||||
|
|
||||||
function M:match(_, bufnr)
|
|
||||||
local resources = {}
|
|
||||||
|
|
||||||
local current = {}
|
|
||||||
for _, line in pairs(vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)) do
|
|
||||||
local _, _, group, version = line:find([[^apiVersion:%s*["']?([^%s"'/]*)/?([^%s"']*)]])
|
|
||||||
local _, _, kind = line:find([[^kind:%s*["']?([^%s"'/]*)]])
|
|
||||||
|
|
||||||
if group and group ~= "" then
|
|
||||||
current.group = group
|
|
||||||
end
|
|
||||||
if version and version ~= "" then
|
|
||||||
current.version = version
|
|
||||||
end
|
|
||||||
if kind and kind ~= "" then
|
|
||||||
current.kind = kind
|
|
||||||
end
|
|
||||||
|
|
||||||
if current.group and current.kind then
|
|
||||||
table.insert(resources, current)
|
|
||||||
current = {}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local schemas = {}
|
|
||||||
for _, resource in pairs(resources) do
|
|
||||||
local api = resource.version and ("%s/%s"):format(resource.group, resource.version) or resource.group
|
|
||||||
local schema = {
|
|
||||||
name = ("%s@%s"):format(resource.kind, api),
|
|
||||||
source = M.name,
|
|
||||||
uri = require("kubernetes").yamlls_schema(),
|
|
||||||
}
|
|
||||||
if schema then
|
|
||||||
table.insert(schemas, schema)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return schemas
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
-- https://github.com/kwkarlwang/bufresize.nvim
|
-- https://github.com/kwkarlwang/bufresize.nvim
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
"kwkarlwang/bufresize.nvim",
|
"kwkarlwang/bufresize.nvim",
|
||||||
opts = {},
|
opts = {},
|
||||||
|
|||||||
@@ -5,15 +5,15 @@ local formatters_by_ft = {
|
|||||||
go = { "goimports" },
|
go = { "goimports" },
|
||||||
python = { "ruff_organize_imports", "ruff_format" },
|
python = { "ruff_organize_imports", "ruff_format" },
|
||||||
rust = { "rustfmt" },
|
rust = { "rustfmt" },
|
||||||
javascript = { "prettier" },
|
javascript = { "prettierd" },
|
||||||
javascriptreact = { "prettier" },
|
javascriptreact = { "prettierd" },
|
||||||
typescript = { "prettier" },
|
typescript = { "prettierd" },
|
||||||
typescriptreact = { "prettier" },
|
typescriptreact = { "prettierd" },
|
||||||
css = { "prettier" },
|
css = { "prettierd" },
|
||||||
markdown = { "prettier" },
|
markdown = { "prettierd" },
|
||||||
yaml = { "prettier" },
|
yaml = { "prettierd" },
|
||||||
lua = { "stylua" },
|
lua = { "stylua" },
|
||||||
json = { "prettier" },
|
json = { "prettierd" },
|
||||||
toml = { "taplo" },
|
toml = { "taplo" },
|
||||||
-- ["*"] = { "injected" },
|
-- ["*"] = { "injected" },
|
||||||
["_"] = { "trim_whitespace", "trim_newlines" },
|
["_"] = { "trim_whitespace", "trim_newlines" },
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
-- https://github.com/Saecki/crates.nvim
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
|
||||||
"Saecki/crates.nvim",
|
|
||||||
event = { "BufRead Cargo.toml" },
|
|
||||||
tag = "stable",
|
|
||||||
--- @type crates.UserConfig
|
|
||||||
opts = {
|
|
||||||
popup = {
|
|
||||||
hide_on_select = true,
|
|
||||||
border = require("symbols.window").border,
|
|
||||||
},
|
|
||||||
lsp = {
|
|
||||||
enabled = true,
|
|
||||||
actions = true,
|
|
||||||
completion = true,
|
|
||||||
hover = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
-- https://github.com/nvim-lualine/lualine.nvim
|
-- https://github.com/nvim-lualine/lualine.nvim
|
||||||
|
|
||||||
local function get_schema()
|
local function get_schema()
|
||||||
if not (vim.bo.filetype == "yaml" or vim.bo.filetype == "json" or vim.bo.filetype == "toml") then
|
if vim.bo.filetype ~= "yaml" then
|
||||||
return ""
|
return ""
|
||||||
end
|
end
|
||||||
|
|
||||||
local schema = (require("schema-companion").get_current_schemas() or "none")
|
local schema = require("schema-companion.context").get_buffer_schema()
|
||||||
if schema == "none" then
|
if schema.name == "none" then
|
||||||
return ""
|
return ""
|
||||||
end
|
end
|
||||||
return schema
|
return schema.name
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @module "lazy"
|
--- @module "lazy"
|
||||||
@@ -43,11 +43,9 @@ return {
|
|||||||
"encoding",
|
"encoding",
|
||||||
{ "fileformat", icons_enabled = false },
|
{ "fileformat", icons_enabled = false },
|
||||||
"filetype",
|
"filetype",
|
||||||
{
|
|
||||||
get_schema,
|
get_schema,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
inactive_sections = {
|
inactive_sections = {
|
||||||
lualine_c = {
|
lualine_c = {
|
||||||
{ "filename", path = 1 },
|
{ "filename", path = 1 },
|
||||||
|
|||||||
@@ -24,9 +24,8 @@ local ensure_installed = {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
"ruff",
|
"ruff",
|
||||||
"prettier",
|
"prettierd",
|
||||||
"stylua",
|
"stylua",
|
||||||
"eslint",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
--- @module "lazy"
|
--- @module "lazy"
|
||||||
|
|||||||
@@ -1,6 +1,33 @@
|
|||||||
-- https://github.com/cenk1cenk2/schema-companion.nvim
|
-- https://github.com/cenk1cenk2/schema-companion.nvim
|
||||||
--- @module "schema-companion"
|
--- @module "schema-companion"
|
||||||
--- @type schema_companion.Matcher
|
--- @type schema_companion.Matcher
|
||||||
|
local kubernetes = {
|
||||||
|
name = "Kubernetes",
|
||||||
|
match = function(bufnr)
|
||||||
|
local lines = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)
|
||||||
|
local kind = false
|
||||||
|
local api_version = false
|
||||||
|
|
||||||
|
for _, line in ipairs(lines) do
|
||||||
|
if kind or vim.regex("^kind: .*$"):match_str(line) then
|
||||||
|
kind = true
|
||||||
|
end
|
||||||
|
|
||||||
|
if api_version or vim.regex("^apiVersion: .*$"):match_str(line) then
|
||||||
|
api_version = true
|
||||||
|
end
|
||||||
|
|
||||||
|
if kind and api_version then
|
||||||
|
return {
|
||||||
|
name = "Kubernetes",
|
||||||
|
uri = require("kubernetes").yamlls_schema(),
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return nil
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
--- @module "lazy"
|
--- @module "lazy"
|
||||||
--- @type LazySpec
|
--- @type LazySpec
|
||||||
@@ -8,13 +35,14 @@ return {
|
|||||||
"cenk1cenk2/schema-companion.nvim",
|
"cenk1cenk2/schema-companion.nvim",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
"diogo464/kubernetes.nvim",
|
"diogo464/kubernetes.nvim",
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
"<leader>ys",
|
"<leader>ys",
|
||||||
function()
|
function()
|
||||||
require("schema-companion").select_schema()
|
require("telescope").extensions.schema_companion.select_schema()
|
||||||
end,
|
end,
|
||||||
desc = "Yaml schema",
|
desc = "Yaml schema",
|
||||||
ft = "yaml",
|
ft = "yaml",
|
||||||
@@ -22,5 +50,11 @@ return {
|
|||||||
},
|
},
|
||||||
--- @module "schema-companion"
|
--- @module "schema-companion"
|
||||||
--- @type schema_companion.Config
|
--- @type schema_companion.Config
|
||||||
opts = {},
|
opts = {
|
||||||
|
enable_telescope = true,
|
||||||
|
matchers = {
|
||||||
|
kubernetes,
|
||||||
|
},
|
||||||
|
schemas = {},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,9 +37,6 @@ return {
|
|||||||
["ui-select"] = {
|
["ui-select"] = {
|
||||||
require("telescope.themes").get_dropdown(),
|
require("telescope.themes").get_dropdown(),
|
||||||
},
|
},
|
||||||
smart_open = {
|
|
||||||
match_algorithm = "fzf",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
@@ -117,25 +114,24 @@ return {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope-fzf-native.nvim",
|
"nvim-telescope/telescope-fzy-native.nvim",
|
||||||
build = "make",
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("telescope").load_extension("fzf")
|
require("telescope").load_extension("fzy_native")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"danielfalk/smart-open.nvim",
|
"danielfalk/smart-open.nvim",
|
||||||
branch = "0.3.x",
|
branch = "0.2.x",
|
||||||
config = function()
|
config = function()
|
||||||
require("telescope").load_extension("smart_open")
|
require("telescope").load_extension("smart_open")
|
||||||
end,
|
end,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"kkharji/sqlite.lua",
|
"kkharji/sqlite.lua",
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
"nvim-telescope/telescope-fzf-native.nvim",
|
"nvim-telescope/telescope-fzy-native.nvim",
|
||||||
{
|
{
|
||||||
"ellisonleao/gruvbox.nvim",
|
"ellisonleao/gruvbox.nvim",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
|
|||||||
@@ -3,9 +3,7 @@ local window = require("symbols.window")
|
|||||||
--- @module "lazy"
|
--- @module "lazy"
|
||||||
--- @type LazySpec
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
-- "folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
"cameronr/which-key.nvim",
|
|
||||||
branch = "winborder-support",
|
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
--- @module "which-key"
|
--- @module "which-key"
|
||||||
--- @type wk.Opts
|
--- @type wk.Opts
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
setup
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# Hide all scratch sessions
|
|
||||||
blacklist = ["scratch-*"]
|
|
||||||
|
|
||||||
# Scratch sessions rename themselves to something unique and are hidden from the overview
|
|
||||||
[[session]]
|
|
||||||
name = "scratch"
|
|
||||||
startup_command = "tmux rename-session scratch-$(echo -n $(date) | sha256sum | cut -c1-4) && tmux set detach-on-destroy on && clear"
|
|
||||||
|
|
||||||
[[session]]
|
|
||||||
name = "automation_rs"
|
|
||||||
path = "~/Projects/rust/automation_rs/"
|
|
||||||
startup_command = "nvim"
|
|
||||||
windows = ["shell"]
|
|
||||||
|
|
||||||
[[session]]
|
|
||||||
name = "olympus"
|
|
||||||
startup_command = "ssh olympus && exit"
|
|
||||||
|
|
||||||
[[session]]
|
|
||||||
name = "niestern_sander"
|
|
||||||
path = "~/Projects/ALTEN/niestern_sander/"
|
|
||||||
startup_command = "$DOTFILES/sesh/setup/niestern_sander.sh"
|
|
||||||
|
|
||||||
[[window]]
|
|
||||||
name = "shell"
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
|
|
||||||
exec </dev/tty
|
|
||||||
exec <&1
|
|
||||||
local session
|
|
||||||
session=$(sesh list -i | fzf-tmux -p 70%,60% \
|
|
||||||
--no-sort --ansi --border-label ' Select session ' --prompt '⚡ ' \
|
|
||||||
--header ' ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find' \
|
|
||||||
--bind 'btab:down,tab:up' \
|
|
||||||
--bind 'ctrl-a:change-prompt(⚡ )+reload(sesh list -i)' \
|
|
||||||
--bind 'ctrl-t:change-prompt(🪟 )+reload(sesh list -t -i)' \
|
|
||||||
--bind 'ctrl-g:change-prompt(⚙️ )+reload(sesh list -c -i)' \
|
|
||||||
--bind 'ctrl-x:change-prompt(📁 )+reload(sesh list -z -i)' \
|
|
||||||
--bind 'ctrl-f:change-prompt(🔎 )+reload(fd -H -d 2 -t d -E .Trash . ~)' \
|
|
||||||
--bind 'ctrl-d:execute(tmux kill-session -t {2..})+change-prompt(⚡ )+reload(sesh list -i)')
|
|
||||||
[[ -z "$session" ]] && return
|
|
||||||
sesh connect $session
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
if ! systemctl is-active --quiet docker; then
|
|
||||||
echo "Starting docker..."
|
|
||||||
systemctl start docker
|
|
||||||
fi
|
|
||||||
|
|
||||||
devcontainer up --workspace-folder .
|
|
||||||
|
|
||||||
tmux rename-window nvim
|
|
||||||
tmux new-window -n "ros" "devcontainer exec --workspace-folder . bash"
|
|
||||||
tmux new-window -n "shell"
|
|
||||||
tmux select-window -t :-2
|
|
||||||
|
|
||||||
devcontainer exec --workspace-folder . nvim
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
# Plugins
|
# Plugins
|
||||||
set -g @plugin 'mrjones2014/smart-splits.nvim'
|
set -g @plugin 'mrjones2014/smart-splits.nvim'
|
||||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||||
set -g @plugin 'wfxr/tmux-fzf-url'
|
|
||||||
|
|
||||||
# Settings
|
# Settings
|
||||||
set -ag terminal-overrides ",xterm-256color:RGB"
|
set -ag terminal-overrides ",xterm-256color:RGB"
|
||||||
@@ -12,8 +11,6 @@ set -sg escape-time 0
|
|||||||
|
|
||||||
set -g history-limit 5000
|
set -g history-limit 5000
|
||||||
|
|
||||||
set -g detach-on-destroy off # don't exit from tmux when closing a session
|
|
||||||
|
|
||||||
# Setup vi-mode with better keybindings
|
# Setup vi-mode with better keybindings
|
||||||
# TODO: Escape does not work properly for leaving
|
# TODO: Escape does not work properly for leaving
|
||||||
setw -g mode-keys vi
|
setw -g mode-keys vi
|
||||||
@@ -76,8 +73,3 @@ bind-key -n M-7 select-window -t 7
|
|||||||
bind-key -n M-8 select-window -t 8
|
bind-key -n M-8 select-window -t 8
|
||||||
bind-key -n M-9 select-window -t 9
|
bind-key -n M-9 select-window -t 9
|
||||||
bind-key -n M-0 select-window -t 10
|
bind-key -n M-0 select-window -t 10
|
||||||
|
|
||||||
bind-key "a" run-shell "sesh-select"
|
|
||||||
|
|
||||||
bind-key x kill-pane
|
|
||||||
bind-key X kill-session
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ plugins=(
|
|||||||
# Disabled because the highlighting conflicts with autosuggestions
|
# Disabled because the highlighting conflicts with autosuggestions
|
||||||
# history-substring-search
|
# history-substring-search
|
||||||
vi-mode
|
vi-mode
|
||||||
|
tmux
|
||||||
colored-man-pages
|
colored-man-pages
|
||||||
command-not-found
|
command-not-found
|
||||||
zsh-autopair
|
zsh-autopair
|
||||||
@@ -42,6 +43,10 @@ VI_MODE_SET_CURSOR=true
|
|||||||
# Might cause issues?
|
# Might cause issues?
|
||||||
KEYTIMEOUT=1
|
KEYTIMEOUT=1
|
||||||
|
|
||||||
|
ZSH_TMUX_AUTOSTART=true
|
||||||
|
ZSH_TMUX_AUTOCONNECT=false
|
||||||
|
ZSH_TMUX_FIXTERM=true
|
||||||
|
|
||||||
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
|
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
|
||||||
autoload -U compinit && compinit
|
autoload -U compinit && compinit
|
||||||
source "$ZSH/oh-my-zsh.sh"
|
source "$ZSH/oh-my-zsh.sh"
|
||||||
@@ -55,12 +60,12 @@ export EDITOR=nvim
|
|||||||
|
|
||||||
alias cl="clear"
|
alias cl="clear"
|
||||||
|
|
||||||
if (( $+commands[bat] )); then
|
if hash bat 2>/dev/null; then
|
||||||
export BAT_THEME="gruvbox-dark"
|
export BAT_THEME="gruvbox-dark"
|
||||||
alias cat=bat
|
alias cat=bat
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (( $+commands[devcontainer] )); then
|
if hash devcontainer 2>/dev/null; then
|
||||||
dc() {
|
dc() {
|
||||||
ORIG_DIR="$PWD"
|
ORIG_DIR="$PWD"
|
||||||
while [[ "$PWD" != / ]] ; do
|
while [[ "$PWD" != / ]] ; do
|
||||||
@@ -87,14 +92,12 @@ if (( $+commands[devcontainer] )); then
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export PNPM_HOME="/home/tim/.local/share/pnpm"
|
if hash pnpm 2>/dev/null; then
|
||||||
if [ -d "$PNPM_HOME" ]; then
|
export PNPM_HOME="/home/tim/.local/share/pnpm"
|
||||||
case ":$PATH:" in
|
case ":$PATH:" in
|
||||||
*":$PNPM_HOME:"*) ;;
|
*":$PNPM_HOME:"*) ;;
|
||||||
*) export PATH="$PNPM_HOME:$PATH" ;;
|
*) export PATH="$PNPM_HOME:$PATH" ;;
|
||||||
esac
|
esac
|
||||||
else
|
|
||||||
unset PNPM_HOME
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export FZF_DEFAULT_OPTS='--tmux'
|
export FZF_DEFAULT_OPTS='--tmux'
|
||||||
@@ -107,22 +110,22 @@ export FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS'
|
|||||||
--prompt="> " --marker="◆" --pointer=">" --separator="─"
|
--prompt="> " --marker="◆" --pointer=">" --separator="─"
|
||||||
--scrollbar="│" --info="right"'
|
--scrollbar="│" --info="right"'
|
||||||
|
|
||||||
if (( $+commands[fd] )); then
|
if hash fd 2>/dev/null; then
|
||||||
export FZF_DEFAULT_COMMAND="fd --type f --strip-cwd-prefix"
|
export FZF_DEFAULT_COMMAND="fd --type f --strip-cwd-prefix"
|
||||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||||
fi
|
fi
|
||||||
if (( $+commands[fzf] )); then
|
if hash fzf 2>/dev/null; then
|
||||||
source <(fzf --zsh)
|
source <(fzf --zsh)
|
||||||
|
|
||||||
if (( $+commands[paru] )); then
|
if hash paru 2>/dev/null; then
|
||||||
function pi {
|
function pi {
|
||||||
paru -Slq | fzf -q "$1" --border-label=" Install package " --multi --preview 'paru -Si {1} --color=always' | xargs -ro paru -S
|
paru -Slq | fzf -q "$1" --border-label="Packages" --multi --preview 'paru -Si {1} --color=always' | xargs -ro paru -S
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export _ZO_FZF_OPTS="--tmux"
|
export _ZO_FZF_OPTS="--tmux"
|
||||||
if (( $+commands[zoxide] )); then
|
if hash zoxide 2>/dev/null; then
|
||||||
eval "$(zoxide init zsh --cmd cd)"
|
eval "$(zoxide init zsh --cmd cd)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -139,15 +142,3 @@ for km in viopp visual; do
|
|||||||
bindkey -M $km $c select-bracketed
|
bindkey -M $km $c select-bracketed
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
ZSH_TMUX_AUTOSTART=true
|
|
||||||
if (( $+commands[tmux] )); then
|
|
||||||
if [[ -z "$TMUX" && "$ZSH_TMUX_AUTOSTART" == "true" && -z "$INSIDE_EMACS" && -z "$EMACS" && -z "$VIM" && -z "$INTELLIJ_ENVIRONMENT_READER" && -z "$ZED_TERM" ]]; then
|
|
||||||
if (( $+commands[sesh] )) && (( $+commands[sesh-select] )); then
|
|
||||||
sesh-select
|
|
||||||
else
|
|
||||||
tmux new-session
|
|
||||||
fi
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|||||||
Reference in New Issue
Block a user