Compare commits
21 Commits
4a698f6e1f
...
wip
| Author | SHA1 | Date | |
|---|---|---|---|
| 9a2a4822c2 | |||
| 9f4a0eb52d | |||
| 2c4d4c2a10 | |||
| 6371fee81b | |||
| d45450227e | |||
| 0be2ea5be3 | |||
| 7ab3c8cdbb | |||
| 410cfe4fca | |||
| baec05802d | |||
| 85553bd9ac | |||
| f6c795b8e9 | |||
| 9778bd3e69 | |||
| 0c16c1d8fe | |||
| bd1652deff | |||
| 4dfb7abbba | |||
| a7c0178983 | |||
| 292de198a6 | |||
| 48392501e1 | |||
| dafff8e0cd | |||
| b4f94f7064 | |||
| be03be655e |
@@ -2,56 +2,19 @@ require("config.options")
|
||||
require("config.remap")
|
||||
require("config.lsp")
|
||||
|
||||
local ok, paq = pcall(require, "paq")
|
||||
if ok then
|
||||
paq({
|
||||
"EdenEast/nightfox.nvim",
|
||||
"stevearc/conform.nvim",
|
||||
"otavioschwanck/arrow.nvim",
|
||||
"folke/flash.nvim",
|
||||
"folke/snacks.nvim",
|
||||
"stevearc/oil.nvim",
|
||||
{
|
||||
"jake-stewart/multicursor.nvim",
|
||||
branch = "1.0",
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
branch = "master",
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
branch = "master",
|
||||
build = ":TSUpdate",
|
||||
},
|
||||
})
|
||||
else
|
||||
print("plugin paq missing")
|
||||
end
|
||||
|
||||
local function load_plugin(name, setup)
|
||||
local cfg = require(setup)
|
||||
name = cfg.main or name
|
||||
local ok, plugin = pcall(require, name)
|
||||
if ok then
|
||||
if cfg.config then
|
||||
cfg.config(cfg.opts)
|
||||
else
|
||||
plugin.setup(cfg.opts)
|
||||
end
|
||||
if cfg.init then
|
||||
cfg.init(plugin)
|
||||
end
|
||||
else
|
||||
print("plugin " .. name .. " missing")
|
||||
end
|
||||
end
|
||||
|
||||
load_plugin("arrow", "plugins.arrow")
|
||||
load_plugin("nightfox", "plugins.colorscheme")
|
||||
load_plugin("conform", "plugins.conform")
|
||||
load_plugin("flash", "plugins.flash")
|
||||
load_plugin("multicursor-nvim", "plugins.multicursor")
|
||||
load_plugin("oil", "plugins.oil")
|
||||
load_plugin("snacks", "plugins.snacks")
|
||||
load_plugin("treesitter", "plugins.treesitter")
|
||||
require("plugins.arrow")
|
||||
require("plugins.auto-session")
|
||||
require("plugins.colorscheme")
|
||||
require("plugins.conform")
|
||||
require("plugins.flash")
|
||||
require("plugins.guess-indent")
|
||||
require("plugins.luasnip")
|
||||
require("plugins.multicursor")
|
||||
require("plugins.nvim-various-textobjs")
|
||||
require("plugins.oil")
|
||||
require("plugins.slimline")
|
||||
require("plugins.snacks")
|
||||
require("plugins.telescope")
|
||||
require("plugins.surround")
|
||||
require("plugins.treesitter")
|
||||
require("plugins.which-key")
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
return {
|
||||
cmd = 'lua-language-server',
|
||||
filetypes = { 'lua' },
|
||||
rootmarkers = { '.git' },
|
||||
cmd = { "lua-language-server" },
|
||||
filetypes = { "lua" },
|
||||
root_markers = { ".luarc.json", ".git" },
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = "LuaJIT",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
5
nvim/.config/nvim/lsp/templ-lsp.lua
Normal file
5
nvim/.config/nvim/lsp/templ-lsp.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
cmd = { "templ", "lsp" },
|
||||
filetypes = { "templ" },
|
||||
root_markers = { "go.mod", "go.work", ".git" },
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
vim.lsp.enable({
|
||||
"clangd",
|
||||
"gopls",
|
||||
"templ-lsp",
|
||||
"lua_ls",
|
||||
"ols",
|
||||
"typescript-language-server",
|
||||
@@ -14,7 +15,7 @@ vim.api.nvim_create_autocmd("LspAttach", {
|
||||
return { abbr = item.label:gsub("%b()", "") }
|
||||
end,
|
||||
})
|
||||
vim.keymap.set("n", "<leader>A", vim.lsp.buf.code_action)
|
||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action)
|
||||
vim.keymap.set("i", "<C-space>", vim.lsp.completion.get)
|
||||
vim.keymap.set("n", "<leader>k", function()
|
||||
vim.diagnostic.jump({ float = true, count = -1 })
|
||||
|
||||
@@ -6,5 +6,8 @@ vim.g.maplocalleader = " \\"
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.signcolumn = "yes"
|
||||
vim.opt.title = true
|
||||
|
||||
vim.opt.timeout = false
|
||||
|
||||
vim.o.undofile = true
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
vim.keymap.set("n", "<M-h>", "<C-w>h")
|
||||
vim.keymap.set("n", "<M-k>", "<C-w>k")
|
||||
vim.keymap.set("n", "<M-j>", "<C-w>j")
|
||||
vim.keymap.set("n", "<M-l>", "<C-w>l")
|
||||
local set = vim.keymap.set
|
||||
|
||||
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<cr>")
|
||||
set("n", "<M-h>", "<C-w>h")
|
||||
set("n", "<M-k>", "<C-w>k")
|
||||
set("n", "<M-j>", "<C-w>j")
|
||||
set("n", "<M-l>", "<C-w>l")
|
||||
|
||||
set("n", "<Esc>", "<cmd>nohlsearch<cr>")
|
||||
set("n", "<leader>K", "<cmd>cp<cr>")
|
||||
set("n", "<leader>J", "<cmd>cn<cr>")
|
||||
set("n", "<leader>x", "<cmd>copen<cr>")
|
||||
set("n", "<leader>X", "<cmd>cclose<cr>")
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
return {
|
||||
opts = {
|
||||
vim.pack.add({ "https://github.com/otavioschwanck/arrow.nvim" })
|
||||
|
||||
local ok, arrow = pcall(require, "arrow")
|
||||
if ok then
|
||||
arrow.setup({
|
||||
show_icons = false,
|
||||
leader_key = "_",
|
||||
buffer_leader_key = " m",
|
||||
},
|
||||
}
|
||||
})
|
||||
else
|
||||
print("plugin arrow missing")
|
||||
end
|
||||
|
||||
12
nvim/.config/nvim/lua/plugins/auto-session.lua
Normal file
12
nvim/.config/nvim/lua/plugins/auto-session.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
vim.pack.add({ "https://github.com/rmagatti/auto-session" })
|
||||
|
||||
vim.keymap.set("n", "<leader>wa", "<cmd>AutoSession search<cr>")
|
||||
|
||||
local ok, sess = pcall(require, "auto-session")
|
||||
if ok then
|
||||
sess.setup({
|
||||
suppressed_dirs = { "~/", "~/src", "~/Downloads", "/" },
|
||||
})
|
||||
else
|
||||
print("plugin auto-session missing")
|
||||
end
|
||||
@@ -1,16 +1,5 @@
|
||||
return {
|
||||
opts = {
|
||||
specs = {
|
||||
all = {
|
||||
syntax = {
|
||||
operator = "#bf8040",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
init = function()
|
||||
local cs = require("config.colorscheme")
|
||||
cs.set_colorschemes("nightfox", "dayfox")
|
||||
cs.update_colorscheme()
|
||||
end,
|
||||
}
|
||||
vim.pack.add({ "https://github.com/EdenEast/nightfox.nvim", "https://github.com/rebelot/kanagawa.nvim" })
|
||||
|
||||
local cs = require("config.colorscheme")
|
||||
cs.set_colorschemes("kanagawa-wave", "dayfox")
|
||||
cs.update_colorscheme()
|
||||
|
||||
@@ -1,11 +1,36 @@
|
||||
return {
|
||||
opts = {
|
||||
vim.pack.add({ "https://github.com/stevearc/conform.nvim" })
|
||||
|
||||
local ok, conform = pcall(require, "conform")
|
||||
if ok then
|
||||
conform.setup({
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
},
|
||||
format_on_save = {
|
||||
timeout_ms = 500,
|
||||
lsp_format = "fallback",
|
||||
},
|
||||
},
|
||||
}
|
||||
format_on_save = function(bufnr)
|
||||
-- Disable with a global or buffer-local variable
|
||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||
return
|
||||
end
|
||||
return { timeout_ms = 500, lsp_format = "fallback" }
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_create_user_command("FormatDisable", function(args)
|
||||
if args.bang then
|
||||
-- FormatDisable! will disable formatting just for this buffer
|
||||
vim.b.disable_autoformat = true
|
||||
else
|
||||
vim.g.disable_autoformat = true
|
||||
end
|
||||
end, {
|
||||
desc = "Disable autoformat-on-save",
|
||||
bang = true,
|
||||
})
|
||||
vim.api.nvim_create_user_command("FormatEnable", function()
|
||||
vim.b.disable_autoformat = false
|
||||
vim.g.disable_autoformat = false
|
||||
end, {
|
||||
desc = "Re-enable autoformat-on-save",
|
||||
})
|
||||
else
|
||||
print("plugin conform missing")
|
||||
end
|
||||
|
||||
@@ -1,24 +1,30 @@
|
||||
return {
|
||||
opts = {
|
||||
vim.pack.add({ "https://github.com/folke/flash.nvim" })
|
||||
|
||||
local ok, flash = pcall(require, "flash")
|
||||
|
||||
if ok then
|
||||
flash.setup({
|
||||
modes = {
|
||||
char = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
init = function()
|
||||
local set = vim.keymap.set
|
||||
set({ "n", "x", "o" }, "\\", function()
|
||||
require("flash").jump()
|
||||
end, { desc = "Flash" })
|
||||
set({ "n", "x", "o" }, "=", function()
|
||||
require("flash").treesitter()
|
||||
end, { desc = "Flash Treesitter" })
|
||||
set({ "o" }, "r", function()
|
||||
require("flash").remote()
|
||||
end, { desc = "Remote Flash" })
|
||||
set({ "n", "x", "o" }, " t", function()
|
||||
require("flash").treesitter_search()
|
||||
end, { desc = "Treesitter Search" })
|
||||
end,
|
||||
}
|
||||
})
|
||||
|
||||
local set = vim.keymap.set
|
||||
|
||||
set({ "n", "x", "o" }, "\\", function()
|
||||
require("flash").jump()
|
||||
end, { desc = "Flash" })
|
||||
set({ "n", "x", "o" }, "=", function()
|
||||
require("flash").treesitter()
|
||||
end, { desc = "Flash Treesitter" })
|
||||
set({ "o" }, "r", function()
|
||||
require("flash").remote()
|
||||
end, { desc = "Remote Flash" })
|
||||
set({ "n", "x", "o" }, " t", function()
|
||||
require("flash").treesitter_search()
|
||||
end, { desc = "Treesitter Search" })
|
||||
else
|
||||
print("plugin flash missing")
|
||||
end
|
||||
|
||||
8
nvim/.config/nvim/lua/plugins/guess-indent.lua
Normal file
8
nvim/.config/nvim/lua/plugins/guess-indent.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
vim.pack.add({ "https://github.com/NMAC427/guess-indent.nvim" })
|
||||
|
||||
local ok, guess_indent = pcall(require, "guess-indent")
|
||||
if ok then
|
||||
guess_indent.setup()
|
||||
else
|
||||
print("plugin guess-indent missing")
|
||||
end
|
||||
48
nvim/.config/nvim/lua/plugins/luasnip.lua
Normal file
48
nvim/.config/nvim/lua/plugins/luasnip.lua
Normal file
@@ -0,0 +1,48 @@
|
||||
vim.api.nvim_create_autocmd("PackChanged", {
|
||||
group = vim.api.nvim_create_augroup("luasnip-update", { clear = true }),
|
||||
callback = function(ev)
|
||||
local name, kind = ev.data.spec.name, ev.data.kind
|
||||
if name == "luasnip" and (kind == "install" or kind == "update") then
|
||||
vim.system({ "make install_jsregexp" }, { cwd = ev.data.path }):wait()
|
||||
print("luasnip make done.")
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.pack.add({ { src = "https://github.com/L3MON4D3/LuaSnip", version = vim.version.range("^2.0.0") } })
|
||||
local ok, ls = pcall(require, "luasnip")
|
||||
|
||||
if ok then
|
||||
vim.keymap.set({ "i" }, "<C-K>", function()
|
||||
ls.expand()
|
||||
end, { silent = true })
|
||||
vim.keymap.set({ "i", "s" }, "<C-L>", function(fallback)
|
||||
if ls.locally_jumpable() then
|
||||
ls.jump(1)
|
||||
else
|
||||
local key = vim.api.nvim_replace_termcodes("<C-L>", true, false, true)
|
||||
vim.api.nvim_feedkeys(key, "n", false)
|
||||
end
|
||||
end, { silent = true })
|
||||
vim.keymap.set({ "i", "s" }, "<C-J>", function()
|
||||
if ls.locally_jumpable() then
|
||||
ls.jump(-1)
|
||||
else
|
||||
local key = vim.api.nvim_replace_termcodes("<C-J>", true, false, true)
|
||||
vim.api.nvim_feedkeys(key, "n", false)
|
||||
end
|
||||
end, { silent = true })
|
||||
|
||||
vim.keymap.set({ "i", "s" }, "<C-E>", function()
|
||||
if ls.choice_active() then
|
||||
ls.change_choice(1)
|
||||
else
|
||||
local key = vim.api.nvim_replace_termcodes("<C-E>", true, false, true)
|
||||
vim.api.nvim_feedkeys(key, "n", false)
|
||||
end
|
||||
end, { silent = true })
|
||||
|
||||
require("luasnip.loaders.from_lua").load({ paths = vim.fs.joinpath(vim.fn.stdpath("config"), "lua", "snippets") })
|
||||
else
|
||||
print("plugin luasnip missing")
|
||||
end
|
||||
@@ -1,71 +1,76 @@
|
||||
return {
|
||||
init = function(mc)
|
||||
local set = vim.keymap.set
|
||||
vim.pack.add({ { src = "https://github.com/jake-stewart/multicursor.nvim", version = "1.0" } })
|
||||
|
||||
-- Add or skip cursor above/below the main cursor.
|
||||
set({ "n", "x" }, "<c-k>", function()
|
||||
mc.lineAddCursor(-1)
|
||||
end)
|
||||
set({ "n", "x" }, "<c-j>", function()
|
||||
mc.lineAddCursor(1)
|
||||
end)
|
||||
set({ "n", "x" }, "<leader><c-k>", function()
|
||||
mc.lineSkipCursor(-1)
|
||||
end)
|
||||
set({ "n", "x" }, "<leader><c-j>", function()
|
||||
mc.lineSkipCursor(1)
|
||||
end)
|
||||
local ok, mc = pcall(require, "multicursor-nvim")
|
||||
if ok then
|
||||
mc.setup()
|
||||
|
||||
-- Add or skip adding a new cursor by matching word/selection
|
||||
set({ "n", "x" }, "<c-n>", function()
|
||||
mc.matchAddCursor(1)
|
||||
end)
|
||||
set({ "n", "x" }, "<leader><c-n>", function()
|
||||
mc.matchSkipCursor(1)
|
||||
end)
|
||||
set({ "n", "x" }, "<c-p>", function()
|
||||
mc.matchAddCursor(-1)
|
||||
end)
|
||||
set({ "n", "x" }, "<leader><c-p>", function()
|
||||
mc.matchSkipCursor(-1)
|
||||
local set = vim.keymap.set
|
||||
|
||||
-- Add or skip cursor above/below the main cursor.
|
||||
set({ "n", "x" }, "<c-k>", function()
|
||||
mc.lineAddCursor(-1)
|
||||
end)
|
||||
set({ "n", "x" }, "<c-j>", function()
|
||||
mc.lineAddCursor(1)
|
||||
end)
|
||||
set({ "n", "x" }, "<leader><c-k>", function()
|
||||
mc.lineSkipCursor(-1)
|
||||
end)
|
||||
set({ "n", "x" }, "<leader><c-j>", function()
|
||||
mc.lineSkipCursor(1)
|
||||
end)
|
||||
|
||||
-- Add or skip adding a new cursor by matching word/selection
|
||||
set({ "n", "x" }, "<c-n>", function()
|
||||
mc.matchAddCursor(1)
|
||||
end)
|
||||
set({ "n", "x" }, "<leader><c-n>", function()
|
||||
mc.matchSkipCursor(1)
|
||||
end)
|
||||
set({ "n", "x" }, "<c-p>", function()
|
||||
mc.matchAddCursor(-1)
|
||||
end)
|
||||
set({ "n", "x" }, "<leader><c-p>", function()
|
||||
mc.matchSkipCursor(-1)
|
||||
end)
|
||||
|
||||
-- Add and remove cursors with control + left click.
|
||||
set("n", "<c-leftmouse>", mc.handleMouse)
|
||||
set("n", "<c-leftdrag>", mc.handleMouseDrag)
|
||||
set("n", "<c-leftrelease>", mc.handleMouseRelease)
|
||||
|
||||
-- Disable and enable cursors.
|
||||
set({ "n", "x" }, "<leader><c-q>", mc.toggleCursor)
|
||||
|
||||
-- Mappings defined in a keymap layer only apply when there are
|
||||
-- multiple cursors. This lets you have overlapping mappings.
|
||||
mc.addKeymapLayer(function(layerSet)
|
||||
-- Select a different cursor as the main one.
|
||||
layerSet({ "n", "x" }, "<left>", mc.prevCursor)
|
||||
layerSet({ "n", "x" }, "<right>", mc.nextCursor)
|
||||
|
||||
-- Delete the main cursor.
|
||||
layerSet({ "n", "x" }, "<leader>x", mc.deleteCursor)
|
||||
|
||||
-- Enable and clear cursors using escape.
|
||||
layerSet("n", "<esc>", function()
|
||||
if not mc.cursorsEnabled() then
|
||||
mc.enableCursors()
|
||||
else
|
||||
mc.clearCursors()
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
-- Add and remove cursors with control + left click.
|
||||
set("n", "<c-leftmouse>", mc.handleMouse)
|
||||
set("n", "<c-leftdrag>", mc.handleMouseDrag)
|
||||
set("n", "<c-leftrelease>", mc.handleMouseRelease)
|
||||
|
||||
-- Disable and enable cursors.
|
||||
set({ "n", "x" }, "<leader><c-q>", mc.toggleCursor)
|
||||
|
||||
-- Mappings defined in a keymap layer only apply when there are
|
||||
-- multiple cursors. This lets you have overlapping mappings.
|
||||
mc.addKeymapLayer(function(layerSet)
|
||||
-- Select a different cursor as the main one.
|
||||
layerSet({ "n", "x" }, "<left>", mc.prevCursor)
|
||||
layerSet({ "n", "x" }, "<right>", mc.nextCursor)
|
||||
|
||||
-- Delete the main cursor.
|
||||
layerSet({ "n", "x" }, "<leader>x", mc.deleteCursor)
|
||||
|
||||
-- Enable and clear cursors using escape.
|
||||
layerSet("n", "<esc>", function()
|
||||
if not mc.cursorsEnabled() then
|
||||
mc.enableCursors()
|
||||
else
|
||||
mc.clearCursors()
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
-- Customize how cursors look.
|
||||
local hl = vim.api.nvim_set_hl
|
||||
hl(0, "MultiCursorCursor", { reverse = true })
|
||||
hl(0, "MultiCursorVisual", { link = "Visual" })
|
||||
hl(0, "MultiCursorSign", { link = "SignColumn" })
|
||||
hl(0, "MultiCursorMatchPreview", { link = "Search" })
|
||||
hl(0, "MultiCursorDisabledCursor", { reverse = true })
|
||||
hl(0, "MultiCursorDisabledVisual", { link = "Visual" })
|
||||
hl(0, "MultiCursorDisabledSign", { link = "SignColumn" })
|
||||
end,
|
||||
}
|
||||
-- Customize how cursors look.
|
||||
local hl = vim.api.nvim_set_hl
|
||||
hl(0, "MultiCursorCursor", { reverse = true })
|
||||
hl(0, "MultiCursorVisual", { link = "Visual" })
|
||||
hl(0, "MultiCursorSign", { link = "SignColumn" })
|
||||
hl(0, "MultiCursorMatchPreview", { link = "Search" })
|
||||
hl(0, "MultiCursorDisabledCursor", { reverse = true })
|
||||
hl(0, "MultiCursorDisabledVisual", { link = "Visual" })
|
||||
hl(0, "MultiCursorDisabledSign", { link = "SignColumn" })
|
||||
else
|
||||
print("plugin multicursor-nvim missing")
|
||||
end
|
||||
|
||||
8
nvim/.config/nvim/lua/plugins/nvim-various-textobjs.lua
Normal file
8
nvim/.config/nvim/lua/plugins/nvim-various-textobjs.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
vim.pack.add({ "https://github.com/chrisgrieser/nvim-various-textobjs" })
|
||||
|
||||
local ok, oil = pcall(require, "various-textobjs")
|
||||
if ok then
|
||||
oil.setup({ keymaps = { useDefaults = true } })
|
||||
else
|
||||
print("plugin nvim-various-textobjs missing")
|
||||
end
|
||||
@@ -1,5 +1,10 @@
|
||||
return {
|
||||
init = function()
|
||||
vim.keymap.set("n", "<leader>-", "<cmd>Oil<cr>", { desc = "Oil file manager" })
|
||||
end,
|
||||
}
|
||||
vim.pack.add({ "https://github.com/stevearc/oil.nvim" })
|
||||
|
||||
local ok, oil = pcall(require, "oil")
|
||||
if ok then
|
||||
oil.setup()
|
||||
else
|
||||
print("plugin oil missing")
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<leader>-", "<cmd>Oil<cr>", { desc = "Oil file manager" })
|
||||
|
||||
8
nvim/.config/nvim/lua/plugins/slimline.lua
Normal file
8
nvim/.config/nvim/lua/plugins/slimline.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
vim.pack.add({ "https://github.com/sschleemilch/slimline.nvim" })
|
||||
|
||||
local ok, slimline = pcall(require, "slimline")
|
||||
if ok then
|
||||
slimline.setup()
|
||||
else
|
||||
print("plugin slimline missing")
|
||||
end
|
||||
@@ -1,177 +1,136 @@
|
||||
return {
|
||||
init = function()
|
||||
local set = vim.keymap.set
|
||||
vim.pack.add({ "https://github.com/folke/snacks.nvim" })
|
||||
|
||||
set("n", "<leader><space>", function()
|
||||
Snacks.picker.smart()
|
||||
end, { desc = "Smart Find Files" })
|
||||
local ok, snacks = pcall(require, "snacks")
|
||||
if ok then
|
||||
snacks.setup({
|
||||
picker = { enabled = true },
|
||||
})
|
||||
else
|
||||
print("plugin snacks missing")
|
||||
end
|
||||
|
||||
set("n", "<leader><space>", function()
|
||||
Snacks.picker.smart()
|
||||
end, { desc = "Smart Find Files" })
|
||||
local set = vim.keymap.set
|
||||
|
||||
set("n", "<leader>a", function()
|
||||
Snacks.picker.buffers()
|
||||
end, { desc = "Buffers" })
|
||||
set("n", "<leader>ea", function()
|
||||
Snacks.explorer()
|
||||
end, { desc = "File Explorer" })
|
||||
|
||||
set("n", "<leader>r", function()
|
||||
Snacks.picker.recent()
|
||||
end, { desc = "Recent files" })
|
||||
set("n", "<leader>ga", function()
|
||||
Snacks.lazygit()
|
||||
end, { desc = "Lazygit" })
|
||||
|
||||
set("n", "<leader>R", function()
|
||||
Snacks.picker.resume()
|
||||
end, { desc = "Resume" })
|
||||
set("n", "<leader>gh", function()
|
||||
Snacks.picker.git_diff()
|
||||
end, { desc = "Git Diff (Hunks)" })
|
||||
|
||||
set("n", "<leader>b", function()
|
||||
Snacks.picker.lines()
|
||||
end, { desc = "Buffer lines" })
|
||||
set("n", "<leader>gl", function()
|
||||
Snacks.picker.git_log_line()
|
||||
end, { desc = "Git Log Line" })
|
||||
|
||||
set("n", "<leader>B", function()
|
||||
Snacks.picker.grep_buffers()
|
||||
end, { desc = "Grep Open Buffers" })
|
||||
set("n", "<leader>gL", function()
|
||||
Snacks.picker.git_log()
|
||||
end, { desc = "Git Log" })
|
||||
|
||||
set("n", "<leader>f", function()
|
||||
Snacks.picker.files()
|
||||
end, { desc = "Find Files" })
|
||||
set("n", "<leader>gr", function()
|
||||
Snacks.lazygit.log_file()
|
||||
end, { desc = "Git Log File (reflog)" })
|
||||
|
||||
set("n", "<leader>s", function()
|
||||
Snacks.picker.grep()
|
||||
end, { desc = "Grep" })
|
||||
set({ "n", "v" }, "<leader>gw", function()
|
||||
Snacks.picker.grep_word()
|
||||
end, { desc = "Grep Visual Selection or Word" })
|
||||
|
||||
set("n", "<leader>S", function()
|
||||
Snacks.picker.git_status()
|
||||
end, { desc = "Git Status" })
|
||||
set({ "n", "v" }, "<leader>gx", function()
|
||||
Snacks.gitbrowse()
|
||||
end, { desc = "Git Browse" })
|
||||
|
||||
set("n", "<leader>g", function()
|
||||
Snacks.picker.git_files()
|
||||
end, { desc = "Find Git Files" })
|
||||
set("n", "<leader>xr", function()
|
||||
Snacks.picker.recent()
|
||||
end, { desc = "Recent files" })
|
||||
|
||||
set("n", "<leader>G", function()
|
||||
Snacks.picker.git_grep()
|
||||
end, { desc = "Git Grep" })
|
||||
set("n", "<leader>xR", function()
|
||||
Snacks.picker.resume()
|
||||
end, { desc = "Resume" })
|
||||
|
||||
set("n", "<leader>l", function()
|
||||
Snacks.lazygit()
|
||||
end, { desc = "Lazygit" })
|
||||
set("n", "<leader>U", function()
|
||||
Snacks.picker.undo()
|
||||
end, { desc = "Undo History" })
|
||||
|
||||
set("n", "<leader>L", function()
|
||||
Snacks.lazygit.log_file()
|
||||
end, { desc = "Lazygit log file" })
|
||||
set("n", "<leader>xC", function()
|
||||
Snacks.picker.colorschemes()
|
||||
end, { desc = "Colorschemes" })
|
||||
|
||||
set("n", "<leader>n", function()
|
||||
Snacks.notifier.show_history()
|
||||
end, { desc = "Notification History" })
|
||||
set("n", "<leader>n", function()
|
||||
Snacks.notifier.show_history()
|
||||
end, { desc = "Notification History" })
|
||||
|
||||
set("n", "<leader>N", function()
|
||||
Snacks.picker.notifications()
|
||||
end, { desc = "Notifications" })
|
||||
set("n", "<leader>N", function()
|
||||
Snacks.picker.notifications()
|
||||
end, { desc = "Notifications" })
|
||||
|
||||
set("n", "<leader>C", function()
|
||||
Snacks.picker.commands()
|
||||
end, { desc = "Commands" })
|
||||
set("n", "<leader>$", function()
|
||||
Snacks.rename.rename_file()
|
||||
end, { desc = "Rename File" })
|
||||
|
||||
set("n", "<leader>h", function()
|
||||
Snacks.picker.keymaps()
|
||||
end, { desc = "Keymaps" })
|
||||
set("n", "<leader>z", function()
|
||||
Snacks.zen.zoom()
|
||||
end, { desc = "Toggle Zoom" })
|
||||
|
||||
set("n", "<leader>:", function()
|
||||
Snacks.picker.command_history()
|
||||
end, { desc = "Command History" })
|
||||
set("n", "<leader>.", function()
|
||||
Snacks.scratch()
|
||||
end, { desc = "Toggle Scratch Buffer" })
|
||||
|
||||
set("n", '<leader>"', function()
|
||||
Snacks.picker.registers()
|
||||
end, { desc = "Registers" })
|
||||
set("n", "<leader>x.", function()
|
||||
Snacks.scratch.select()
|
||||
end, { desc = "Select Scratch Buffer" })
|
||||
|
||||
set("n", "<leader>$", function()
|
||||
Snacks.rename.rename_file()
|
||||
end, { desc = "Rename File" })
|
||||
-- LSP
|
||||
|
||||
set("n", "<leader>z", function()
|
||||
Snacks.zen.zoom()
|
||||
end, { desc = "Toggle Zoom" })
|
||||
-- LSP
|
||||
set("n", "gD", function()
|
||||
Snacks.picker.lsp_declarations()
|
||||
end, { desc = "Goto Declaration" })
|
||||
|
||||
set("n", "gd", function()
|
||||
Snacks.picker.lsp_definitions()
|
||||
end, { desc = "Goto Definition" })
|
||||
-- Terminal
|
||||
|
||||
set("n", "gD", function()
|
||||
Snacks.picker.lsp_declarations()
|
||||
end, { desc = "Goto Declaration" })
|
||||
set({ "n", "t" }, "<c-/>", function()
|
||||
Snacks.terminal()
|
||||
end, { desc = "Toggle Terminal" })
|
||||
|
||||
set("n", "gr", function()
|
||||
Snacks.picker.lsp_references()
|
||||
end, { desc = "References" })
|
||||
set({ "n", "t" }, "<c-_>", function()
|
||||
Snacks.terminal()
|
||||
end, { desc = "which_key_ignore" })
|
||||
|
||||
set("n", "gI", function()
|
||||
Snacks.picker.lsp_implementations()
|
||||
end, { desc = "Goto Implementation" })
|
||||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
callback = function()
|
||||
-- Setup some globals for debugging (lazy-loaded)
|
||||
_G.dd = function(...)
|
||||
Snacks.debug.inspect(...)
|
||||
end
|
||||
_G.bt = function()
|
||||
Snacks.debug.backtrace()
|
||||
end
|
||||
|
||||
set("n", "gy", function()
|
||||
Snacks.picker.lsp_type_definitions()
|
||||
end, { desc = "Goto T[y]pe Definition" })
|
||||
-- Override print to use snacks for `:=` command
|
||||
if vim.fn.has("nvim-0.11") == 1 then
|
||||
vim._print = function(_, ...)
|
||||
dd(...)
|
||||
end
|
||||
else
|
||||
vim.print = _G.dd
|
||||
end
|
||||
|
||||
set("n", "<leader>w", function()
|
||||
Snacks.picker.lsp_symbols()
|
||||
end, { desc = "LSP Symbols" })
|
||||
|
||||
set("n", "<leader>d", function()
|
||||
Snacks.picker.diagnostics_buffer()
|
||||
end, { desc = "Buffer Diagnostics" })
|
||||
|
||||
set("n", "<leader>D", function()
|
||||
Snacks.picker.diagnostics()
|
||||
end, { desc = "Diagnostics" })
|
||||
|
||||
set("n", "<leader>W", function()
|
||||
Snacks.picker.lsp_workspace_symbols()
|
||||
end, { desc = "LSP Workspace Symbols" })
|
||||
-- Terminal
|
||||
|
||||
set({ "n", "t" }, "<c-/>", function()
|
||||
Snacks.terminal()
|
||||
end, { desc = "Toggle Terminal" })
|
||||
|
||||
set({ "n", "t" }, "<c-_>", function()
|
||||
Snacks.terminal()
|
||||
end, { desc = "which_key_ignore" })
|
||||
|
||||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
callback = function()
|
||||
-- Setup some globals for debugging (lazy-loaded)
|
||||
_G.dd = function(...)
|
||||
Snacks.debug.inspect(...)
|
||||
end
|
||||
_G.bt = function()
|
||||
Snacks.debug.backtrace()
|
||||
end
|
||||
|
||||
-- Override print to use snacks for `:=` command
|
||||
if vim.fn.has("nvim-0.11") == 1 then
|
||||
vim._print = function(_, ...)
|
||||
dd(...)
|
||||
end
|
||||
else
|
||||
vim.print = _G.dd
|
||||
end
|
||||
|
||||
-- Create some toggle mappings
|
||||
Snacks.toggle.option("spell", { name = "Spelling" }):map("<leader>us")
|
||||
Snacks.toggle.option("wrap", { name = "Wrap" }):map("<leader>uw")
|
||||
Snacks.toggle.option("relativenumber", { name = "Relative Number" }):map("<leader>uL")
|
||||
Snacks.toggle.diagnostics():map("<leader>ud")
|
||||
Snacks.toggle.line_number():map("<leader>ul")
|
||||
Snacks.toggle
|
||||
.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 })
|
||||
:map("<leader>uc")
|
||||
Snacks.toggle.treesitter():map("<leader>uT")
|
||||
Snacks.toggle
|
||||
.option("background", { off = "light", on = "dark", name = "Dark Background" })
|
||||
:map("<leader>ub")
|
||||
Snacks.toggle.inlay_hints():map("<leader>uh")
|
||||
Snacks.toggle.indent():map("<leader>ug")
|
||||
Snacks.toggle.dim():map("<leader>uD")
|
||||
end,
|
||||
})
|
||||
-- Create some toggle mappings
|
||||
Snacks.toggle.option("spell", { name = "Spelling" }):map("<leader>us")
|
||||
Snacks.toggle.option("wrap", { name = "Wrap" }):map("<leader>uw")
|
||||
Snacks.toggle.option("relativenumber", { name = "Relative Number" }):map("<leader>uL")
|
||||
Snacks.toggle.diagnostics():map("<leader>ud")
|
||||
Snacks.toggle.line_number():map("<leader>ul")
|
||||
Snacks.toggle
|
||||
.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 })
|
||||
:map("<leader>uc")
|
||||
Snacks.toggle.treesitter():map("<leader>uT")
|
||||
Snacks.toggle.option("background", { off = "light", on = "dark", name = "Dark Background" }):map("<leader>ub")
|
||||
Snacks.toggle.inlay_hints():map("<leader>uh")
|
||||
Snacks.toggle.indent():map("<leader>ug")
|
||||
Snacks.toggle.dim():map("<leader>uD")
|
||||
end,
|
||||
}
|
||||
})
|
||||
|
||||
13
nvim/.config/nvim/lua/plugins/surround.lua
Normal file
13
nvim/.config/nvim/lua/plugins/surround.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
vim.pack.add({
|
||||
{
|
||||
src = "https://github.com/kylechui/nvim-surround",
|
||||
version = vim.version.range("^3.0.0"),
|
||||
},
|
||||
})
|
||||
|
||||
local ok, surround = pcall(require, "nvim-surround")
|
||||
if ok then
|
||||
surround.setup()
|
||||
else
|
||||
print("plugin surround missing")
|
||||
end
|
||||
99
nvim/.config/nvim/lua/plugins/telescope.lua
Normal file
99
nvim/.config/nvim/lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,99 @@
|
||||
vim.api.nvim_create_autocmd("PackChanged", {
|
||||
group = vim.api.nvim_create_augroup("telescope-fzf-native-update", { clear = true }),
|
||||
callback = function(ev)
|
||||
local name, kind = ev.data.spec.name, ev.data.kind
|
||||
if name == "telescope-fzf-native.nvim" and (kind == "install" or kind == "update") then
|
||||
vim.system({ "make" }, { cwd = ev.data.path }):wait()
|
||||
print("telescope-fzf-native make done.")
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.pack.add({
|
||||
{ src = "https://github.com/nvim-telescope/telescope.nvim", version = "v0.2.1" },
|
||||
"https://github.com/nvim-lua/plenary.nvim",
|
||||
"https://github.com/nvim-telescope/telescope-fzf-native.nvim",
|
||||
"https://gitlab.com/davvid/telescope-git-grep.nvim",
|
||||
{ src = "https://github.com/nvim-telescope/telescope-frecency.nvim", version = vim.version.range("^1.0.0") },
|
||||
})
|
||||
|
||||
local ok, builtin = pcall(require, "telescope.builtin")
|
||||
if ok then
|
||||
require("telescope").setup({
|
||||
defaults = require("telescope.themes").get_ivy(),
|
||||
})
|
||||
local set = vim.keymap.set
|
||||
|
||||
require("telescope").load_extension("fzf")
|
||||
require("telescope").load_extension("git_grep")
|
||||
require("telescope").load_extension("frecency")
|
||||
set("n", "<leader><space>", function()
|
||||
require("telescope-frecency").start()
|
||||
end, { desc = "Telescope frecency" })
|
||||
set("n", "<leader>;", function()
|
||||
require("telescope-frecency").start({ workspace = "CWD" })
|
||||
end, { desc = "Telescope frecency" })
|
||||
set("n", "<leader>b", builtin.buffers, { desc = "Telescope buffers" })
|
||||
set("n", "<leader>cc", builtin.commands, { desc = "Telescope commands" })
|
||||
set("n", "<leader>ch", builtin.command_history, { desc = "Telescope command history" })
|
||||
set("n", "<leader>cH", builtin.highlights, { desc = "Telescope highlights" })
|
||||
set("n", "<leader>da", builtin.diagnostics, { desc = "Telescope diagnostics" })
|
||||
set("n", "<leader>ec", function()
|
||||
builtin.find_files({ cwd = vim.fn.stdpath("config") })
|
||||
end, { desc = "Telescope nvim config files" })
|
||||
set("n", "<leader>ep", function()
|
||||
builtin.find_files({ cwd = vim.fs.joinpath(vim.fn.stdpath("data"), "site") })
|
||||
end, { desc = "Telescope find files" })
|
||||
set("n", "<leader>fa", builtin.git_files, { desc = "Telescope nvim package files" })
|
||||
set("n", "<leader>F", builtin.find_files, { desc = "Telescope find files" })
|
||||
set("n", "<leader>fh", function()
|
||||
builtin.find_files({ hidden = true })
|
||||
end, { desc = "Telescope find files (hidden)" })
|
||||
set("n", "<leader>gB", builtin.git_branches, { desc = "Telescope git branches" })
|
||||
set("n", "<leader>gc", builtin.git_bcommits, { desc = "Telescope git buffer commits" })
|
||||
set("n", "<leader>gC", builtin.git_commits, { desc = "Telescope git commits" })
|
||||
set("n", "<leader>gs", builtin.git_status, { desc = "Telescope git status" })
|
||||
set("n", "<leader>gS", builtin.git_stash, { desc = "Telescope git stash" })
|
||||
set("n", "<leader>ha", builtin.help_tags, { desc = "Telescope help tags" })
|
||||
set("n", "<leader>hk", builtin.keymaps, { desc = "Telescope keymaps" })
|
||||
set("n", "<leader>l", builtin.current_buffer_fuzzy_find, { desc = "Telescope current buffer fuzzy find" })
|
||||
set("n", "<leader>L", function()
|
||||
builtin.live_grep({ grep_open_files = true })
|
||||
end, { desc = "Telescope grep open files" })
|
||||
set("n", "<leader>m", builtin.marks, { desc = "Telescope marks" })
|
||||
set("n", "<leader>M", builtin.man_pages, { desc = "Telescope man pages" })
|
||||
set("n", "<leader>o", builtin.oldfiles, { desc = "Telescope oldfiles" })
|
||||
set("n", "<leader>qa", builtin.quickfix, { desc = "Telescope quickfix" })
|
||||
set("n", "<leader>qh", builtin.quickfixhistory, { desc = "Telescope quickfix history" })
|
||||
set("n", "<leader>ql", builtin.loclist, { desc = "Telescope loclist" })
|
||||
set("n", "<leader>r", builtin.resume, { desc = "Telescope resume" })
|
||||
set("n", "<leader>t", builtin.treesitter, { desc = "Telescope treesitter symbols" })
|
||||
set("n", "<leader>R", builtin.registers, { desc = "Telescope registers" })
|
||||
set("n", "<leader>sa", function()
|
||||
require("git_grep").live_grep()
|
||||
end, { desc = "Telescope git live grep" })
|
||||
set("n", "<leader>S", builtin.live_grep, { desc = "Telescope live grep" })
|
||||
set("n", "<leader>sh", builtin.search_history, { desc = "Telescope search history" })
|
||||
set("n", "<leader>so", function()
|
||||
builtin.grep_string({ grep_open_files = true })
|
||||
end, { desc = "Telescope grep open files" })
|
||||
set({ "n", "v" }, "<leader>sw", function()
|
||||
require("git_grep").grep()
|
||||
end, { desc = "Telescope git grep word" })
|
||||
set("n", "<leader>wd", builtin.lsp_document_symbols, { desc = "Telescope document symbols" })
|
||||
set("n", "<leader>wp", builtin.lsp_workspace_symbols, { desc = "Telescope workspace symbols" })
|
||||
set("n", "<leader>ws", function()
|
||||
require("git_grep").workspace_live_grep()
|
||||
end, { desc = "Telescope workspace git live grep" })
|
||||
set("n", "<leader>wy", function()
|
||||
require("git_grep").workspace_grep()
|
||||
end, { desc = "Telescope workspace git grep word" })
|
||||
set("n", "<leader>:", builtin.builtin, { desc = "Telescope builtin" })
|
||||
|
||||
set("n", "gd", builtin.lsp_definitions, { desc = "Goto Definition" })
|
||||
set("n", "grr", builtin.lsp_references, { desc = "References" })
|
||||
set("n", "gI", builtin.lsp_implementations, { desc = "Goto Implementation" })
|
||||
set("n", "gy", builtin.lsp_type_definitions, { desc = "Goto T[y]pe Definition" })
|
||||
else
|
||||
print("plugin builtin missing")
|
||||
end
|
||||
@@ -1,6 +1,26 @@
|
||||
return {
|
||||
main = "nvim-treesitter.configs",
|
||||
opts = {
|
||||
-- run ":TSUpdate" after plugin update
|
||||
-- If hooks need to run on install, run this before `vim.pack.add()`
|
||||
vim.api.nvim_create_autocmd("PackChanged", {
|
||||
group = vim.api.nvim_create_augroup("nvim-treesitter-update", { clear = true }),
|
||||
callback = function(ev)
|
||||
local name, kind = ev.data.spec.name, ev.data.kind
|
||||
if name == "nvim-treesitter" and kind == "update" then
|
||||
if not ev.data.active then
|
||||
vim.cmd.packadd("nvim-treesitter")
|
||||
end
|
||||
vim.cmd("TSUpdate")
|
||||
print("TSUpdate done.")
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.pack.add({
|
||||
{ src = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects", version = "master" },
|
||||
{ src = "https://github.com/nvim-treesitter/nvim-treesitter", version = "master" },
|
||||
})
|
||||
local ok, configs = pcall(require, "nvim-treesitter.configs")
|
||||
if ok then
|
||||
configs.setup({
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
@@ -58,5 +78,7 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
else
|
||||
print("plugin nvim-treesitter.configs missing")
|
||||
end
|
||||
|
||||
8
nvim/.config/nvim/lua/plugins/which-key.lua
Normal file
8
nvim/.config/nvim/lua/plugins/which-key.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
vim.pack.add({ "https://github.com/folke/which-key.nvim" })
|
||||
|
||||
local ok, whichkey = pcall(require, "which-key")
|
||||
if ok then
|
||||
whichkey.setup({ preset = "helix", delay = 1000 })
|
||||
else
|
||||
print("plugin whichkey missing")
|
||||
end
|
||||
43
nvim/.config/nvim/lua/snippets/go.lua
Normal file
43
nvim/.config/nvim/lua/snippets/go.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
return {
|
||||
s(
|
||||
"ife",
|
||||
fmt(
|
||||
[[
|
||||
if err != nil {
|
||||
<>
|
||||
}
|
||||
]],
|
||||
{
|
||||
i(0),
|
||||
},
|
||||
{ delimiters = "<>" }
|
||||
)
|
||||
),
|
||||
|
||||
s(
|
||||
"ifse",
|
||||
fmt(
|
||||
[[
|
||||
if <><>err = <>; err != nil {
|
||||
<>
|
||||
}
|
||||
]],
|
||||
{
|
||||
i(1),
|
||||
f(function(args)
|
||||
local a = args[1][1]
|
||||
if string.sub(a, -2) == ", " or a == "" then
|
||||
return ""
|
||||
elseif string.sub(a, -1) == "," then
|
||||
return " "
|
||||
else
|
||||
return ", "
|
||||
end
|
||||
end, { 1 }),
|
||||
i(2),
|
||||
i(0),
|
||||
},
|
||||
{ delimiters = "<>" }
|
||||
)
|
||||
),
|
||||
}
|
||||
99
nvim/.config/nvim/nvim-pack-lock.json
Normal file
99
nvim/.config/nvim/nvim-pack-lock.json
Normal file
@@ -0,0 +1,99 @@
|
||||
{
|
||||
"plugins": {
|
||||
"LuaSnip": {
|
||||
"rev": "5a1e39223db9a0498024a77b8441169d260c8c25",
|
||||
"src": "https://github.com/L3MON4D3/LuaSnip",
|
||||
"version": "2.0.0 - 3.0.0"
|
||||
},
|
||||
"arrow.nvim": {
|
||||
"rev": "6e0f726f55f99332dd726a53effd6813786b6d49",
|
||||
"src": "https://github.com/otavioschwanck/arrow.nvim"
|
||||
},
|
||||
"auto-session": {
|
||||
"rev": "292492ab7af4bd8b9e37e28508bc8ce995722fd5",
|
||||
"src": "https://github.com/rmagatti/auto-session"
|
||||
},
|
||||
"conform.nvim": {
|
||||
"rev": "8314f4c9e205e7f30b62147069729f9a1227d8bf",
|
||||
"src": "https://github.com/stevearc/conform.nvim"
|
||||
},
|
||||
"flash.nvim": {
|
||||
"rev": "fcea7ff883235d9024dc41e638f164a450c14ca2",
|
||||
"src": "https://github.com/folke/flash.nvim"
|
||||
},
|
||||
"guess-indent.nvim": {
|
||||
"rev": "84a4987ff36798c2fc1169cbaff67960aed9776f",
|
||||
"src": "https://github.com/NMAC427/guess-indent.nvim"
|
||||
},
|
||||
"kanagawa.nvim": {
|
||||
"rev": "aef7f5cec0a40dbe7f3304214850c472e2264b10",
|
||||
"src": "https://github.com/rebelot/kanagawa.nvim"
|
||||
},
|
||||
"multicursor.nvim": {
|
||||
"rev": "993c6eda70077c5619388900dcffefff73b40c96",
|
||||
"src": "https://github.com/jake-stewart/multicursor.nvim",
|
||||
"version": "'1.0'"
|
||||
},
|
||||
"nightfox.nvim": {
|
||||
"rev": "ba47d4b4c5ec308718641ba7402c143836f35aa9",
|
||||
"src": "https://github.com/EdenEast/nightfox.nvim"
|
||||
},
|
||||
"nvim-surround": {
|
||||
"rev": "1098d7b3c34adcfa7feb3289ee434529abd4afd1",
|
||||
"src": "https://github.com/kylechui/nvim-surround",
|
||||
"version": "3.0.0 - 4.0.0"
|
||||
},
|
||||
"nvim-treesitter": {
|
||||
"rev": "42fc28ba918343ebfd5565147a42a26580579482",
|
||||
"src": "https://github.com/nvim-treesitter/nvim-treesitter",
|
||||
"version": "'master'"
|
||||
},
|
||||
"nvim-treesitter-textobjects": {
|
||||
"rev": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef",
|
||||
"src": "https://github.com/nvim-treesitter/nvim-treesitter-textobjects",
|
||||
"version": "'master'"
|
||||
},
|
||||
"nvim-various-textobjs": {
|
||||
"rev": "1532de4649c81b88ee0b4e53bdd17e551dd4589a",
|
||||
"src": "https://github.com/chrisgrieser/nvim-various-textobjs"
|
||||
},
|
||||
"oil.nvim": {
|
||||
"rev": "81b8a91735ad5cd24a6b3137f14a89f19176364f",
|
||||
"src": "https://github.com/stevearc/oil.nvim"
|
||||
},
|
||||
"plenary.nvim": {
|
||||
"rev": "b9fd5226c2f76c951fc8ed5923d85e4de065e509",
|
||||
"src": "https://github.com/nvim-lua/plenary.nvim"
|
||||
},
|
||||
"slimline.nvim": {
|
||||
"rev": "b23d6239ae06d7b422b30b227756971348ffcd68",
|
||||
"src": "https://github.com/sschleemilch/slimline.nvim"
|
||||
},
|
||||
"snacks.nvim": {
|
||||
"rev": "fe7cfe9800a182274d0f868a74b7263b8c0c020b",
|
||||
"src": "https://github.com/folke/snacks.nvim"
|
||||
},
|
||||
"telescope-frecency.nvim": {
|
||||
"rev": "d4f1bb2a939cc02720bceb635095246751db144f",
|
||||
"src": "https://github.com/nvim-telescope/telescope-frecency.nvim",
|
||||
"version": "1.0.0 - 2.0.0"
|
||||
},
|
||||
"telescope-fzf-native.nvim": {
|
||||
"rev": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c",
|
||||
"src": "https://github.com/nvim-telescope/telescope-fzf-native.nvim"
|
||||
},
|
||||
"telescope-git-grep.nvim": {
|
||||
"rev": "0936967941a6e7b3875d1b1bfff41b8bcd75bdf5",
|
||||
"src": "https://gitlab.com/davvid/telescope-git-grep.nvim"
|
||||
},
|
||||
"telescope.nvim": {
|
||||
"rev": "3333a52ff548ba0a68af6d8da1e54f9cd96e9179",
|
||||
"src": "https://github.com/nvim-telescope/telescope.nvim",
|
||||
"version": "'v0.2.1'"
|
||||
},
|
||||
"which-key.nvim": {
|
||||
"rev": "3aab2147e74890957785941f0c1ad87d0a44c15a",
|
||||
"src": "https://github.com/folke/which-key.nvim"
|
||||
}
|
||||
}
|
||||
}
|
||||
5
oxwm/.config/oxwm/.luarc.json
Normal file
5
oxwm/.config/oxwm/.luarc.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"workspace.library" : [
|
||||
"/usr/local/share/oxwm"
|
||||
]
|
||||
}
|
||||
321
oxwm/.config/oxwm/config.lua
Normal file
321
oxwm/.config/oxwm/config.lua
Normal file
@@ -0,0 +1,321 @@
|
||||
---@meta
|
||||
|
||||
---Load type definitions for LSP
|
||||
---@module 'oxwm'
|
||||
|
||||
-- Modifier key: "Mod4" is the Super/Windows key, "Mod1" is Alt
|
||||
local modkey = "Mod4"
|
||||
|
||||
-- Terminal emulator command (defaults to alacritty)
|
||||
local terminal = "st"
|
||||
|
||||
local colors
|
||||
local f = io.open(os.getenv("HOME") .. "/.lightmode")
|
||||
if f ~= nil then
|
||||
io.close(f)
|
||||
colors = require("light")
|
||||
else
|
||||
colors = require("dark")
|
||||
end
|
||||
os.execute("hsetroot -solid '" .. colors.bg .. "'")
|
||||
|
||||
-- Workspace tags - can be numbers, names, or icons (requires a Nerd Font)
|
||||
local tags = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }
|
||||
|
||||
-- Font for the status bar (use "fc-list" to see available fonts)
|
||||
local bar_font = "monospace:style=Bold:size=10"
|
||||
|
||||
-- Define your blocks
|
||||
-- Similar to widgets in qtile, or dwmblocks
|
||||
local blocks = {
|
||||
oxwm.bar.block.ram({
|
||||
format = "Ram: {used}/{total} GB",
|
||||
interval = 5,
|
||||
color = colors.light_blue,
|
||||
underline = false,
|
||||
}),
|
||||
oxwm.bar.block.static({
|
||||
text = " │ ",
|
||||
interval = 999999999,
|
||||
color = colors.lavender,
|
||||
underline = false,
|
||||
}),
|
||||
oxwm.bar.block.shell({
|
||||
format = "{}",
|
||||
command = "uname -r",
|
||||
interval = 999999999,
|
||||
color = colors.red,
|
||||
underline = false,
|
||||
}),
|
||||
-- oxwm.bar.block.static({
|
||||
-- text = " │ ",
|
||||
-- interval = 999999999,
|
||||
-- color = colors.lavender,
|
||||
-- underline = false,
|
||||
-- }),
|
||||
-- oxwm.bar.block.battery({
|
||||
-- format = "Bat: {}%",
|
||||
-- charging = "⚡ Bat: {}%",
|
||||
-- discharging = "- Bat: {}%",
|
||||
-- full = "✓ Bat: {}%",
|
||||
-- interval = 30,
|
||||
-- color = colors.green,
|
||||
-- underline = false,
|
||||
-- }),
|
||||
oxwm.bar.block.static({
|
||||
text = " │ ",
|
||||
interval = 999999999,
|
||||
color = colors.lavender,
|
||||
underline = false,
|
||||
}),
|
||||
oxwm.bar.block.datetime({
|
||||
format = "{}",
|
||||
date_format = "%a, %b %d - %H:%M",
|
||||
interval = 1,
|
||||
color = colors.cyan,
|
||||
underline = false,
|
||||
}),
|
||||
}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Basic Settings
|
||||
-------------------------------------------------------------------------------
|
||||
oxwm.set_terminal(terminal)
|
||||
oxwm.set_modkey(modkey) -- This is for Mod + mouse binds, such as drag/resize
|
||||
oxwm.set_tags(tags)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Layouts
|
||||
-------------------------------------------------------------------------------
|
||||
-- Set custom symbols for layouts (displayed in the status bar)
|
||||
-- Available layouts: "tiling", "normie" (floating), "grid", "monocle", "tabbed"
|
||||
oxwm.set_layout_symbol("tiling", "[T]")
|
||||
oxwm.set_layout_symbol("normie", "[F]")
|
||||
oxwm.set_layout_symbol("tabbed", "[=]")
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Appearance
|
||||
-------------------------------------------------------------------------------
|
||||
-- Border configuration
|
||||
|
||||
-- Width in pixels
|
||||
oxwm.border.set_width(3)
|
||||
-- Color of focused window border
|
||||
oxwm.border.set_focused_color(colors.orange)
|
||||
-- Color of unfocused window borders
|
||||
oxwm.border.set_unfocused_color(colors.grey)
|
||||
|
||||
-- Smart Enabled = No border if 1 window
|
||||
oxwm.gaps.set_smart(true)
|
||||
-- Inner gaps (horizontal, vertical) in pixels
|
||||
oxwm.gaps.set_inner(5, 5)
|
||||
-- Outer gaps (horizontal, vertical) in pixels
|
||||
oxwm.gaps.set_outer(5, 5)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Window Rules
|
||||
-------------------------------------------------------------------------------
|
||||
-- Rules allow you to automatically configure windows based on their properties
|
||||
-- You can match windows by class, instance, title, or role
|
||||
-- Available properties: floating, tag, fullscreen, etc.
|
||||
--
|
||||
-- Common use cases:
|
||||
-- - Force floating for certain applications (dialogs, utilities)
|
||||
-- - Send specific applications to specific workspaces
|
||||
-- - Configure window behavior based on title or class
|
||||
|
||||
-- Examples (uncomment to use):
|
||||
oxwm.rule.add({ instance = "gimp", floating = true })
|
||||
-- oxwm.rule.add({ class = "Alacritty", tag = 9, focus = true })
|
||||
-- oxwm.rule.add({ class = "firefox", title = "Library", floating = true })
|
||||
-- oxwm.rule.add({ class = "firefox", tag = 2 })
|
||||
-- oxwm.rule.add({ instance = "mpv", floating = true })
|
||||
|
||||
-- To find window properties, use xprop and click on the window
|
||||
-- WM_CLASS(STRING) shows both instance and class (instance, class)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Status Bar Configuration
|
||||
-------------------------------------------------------------------------------
|
||||
-- Font configuration
|
||||
oxwm.bar.set_font(bar_font)
|
||||
|
||||
-- Set your blocks here (defined above)
|
||||
oxwm.bar.set_blocks(blocks)
|
||||
|
||||
-- Bar color schemes (for workspace tag display)
|
||||
-- Parameters: foreground, background, border
|
||||
|
||||
-- Unoccupied tags
|
||||
oxwm.bar.set_scheme_normal(colors.fg, colors.bg, "#444444")
|
||||
-- Occupied tags
|
||||
oxwm.bar.set_scheme_occupied(colors.cyan, colors.bg, colors.cyan)
|
||||
-- Currently selected tag
|
||||
oxwm.bar.set_scheme_selected(colors.orange, colors.bg, colors.orange)
|
||||
-- Urgent tags (windows requesting attention)
|
||||
oxwm.bar.set_scheme_urgent(colors.red, colors.bg, colors.red)
|
||||
|
||||
-- Hide tags that have no windows and are not selected
|
||||
-- oxwm.bar.set_hide_vacant_tags(true)
|
||||
--
|
||||
function shell_quote(s)
|
||||
return '"' .. string.gsub(s, '[$"!`\\]', "\\%1") .. '"'
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Keybindings
|
||||
-------------------------------------------------------------------------------
|
||||
-- Keybindings are defined using oxwm.key.bind(modifiers, key, action)
|
||||
-- Modifiers: {"Mod4"}, {"Mod1"}, {"Shift"}, {"Control"}, or combinations like {"Mod4", "Shift"}
|
||||
-- Keys: Use uppercase for letters (e.g., "Return", "H", "J", "K", "L")
|
||||
-- Actions: Functions that return actions (e.g., oxwm.spawn(), oxwm.client.kill())
|
||||
--
|
||||
-- A list of available keysyms can be found in the X11 keysym definitions.
|
||||
-- Common keys: Return, Space, Tab, Escape, Backspace, Delete, Left, Right, Up, Down
|
||||
|
||||
-- Basic window management
|
||||
|
||||
oxwm.key.bind({ modkey }, "Return", oxwm.spawn_terminal())
|
||||
-- Launch Dmenu
|
||||
oxwm.key.bind(
|
||||
{ modkey },
|
||||
"P",
|
||||
oxwm.spawn({
|
||||
"sh",
|
||||
"-c",
|
||||
"dmenu_run -l 10 -fn " .. shell_quote(bar_font) .. " -nb " .. shell_quote(colors.bg) .. " -nf " .. shell_quote(
|
||||
colors.fg
|
||||
) .. " -sb " .. shell_quote(colors.orange) .. " -sf " .. shell_quote(colors.black),
|
||||
})
|
||||
)
|
||||
-- Copy screenshot to clipboard
|
||||
oxwm.key.bind({ modkey }, "S", oxwm.spawn({ "sh", "-c", "maim -s | xclip -selection clipboard -t image/png" }))
|
||||
oxwm.key.bind({ modkey }, "X", oxwm.client.kill())
|
||||
|
||||
-- Keybind overlay - Shows important keybindings on screen
|
||||
oxwm.key.bind({ modkey, "Shift" }, "Slash", oxwm.show_keybinds())
|
||||
|
||||
-- Window state toggles
|
||||
oxwm.key.bind({ modkey }, "F", oxwm.client.toggle_fullscreen())
|
||||
oxwm.key.bind({ modkey, "Shift" }, "Space", oxwm.client.toggle_floating())
|
||||
|
||||
-- Layout management
|
||||
oxwm.key.bind({ modkey, "Shift" }, "F", oxwm.layout.set("normie"))
|
||||
oxwm.key.bind({ modkey }, "T", oxwm.layout.set("tiling"))
|
||||
oxwm.key.bind({ modkey }, "G", oxwm.layout.set("grid"))
|
||||
oxwm.key.bind({ modkey }, "M", oxwm.layout.set("monocle"))
|
||||
oxwm.key.bind({ modkey }, "B", oxwm.layout.set("tabbed"))
|
||||
oxwm.key.bind({ modkey, "Shift" }, "S", oxwm.layout.set("scrolling"))
|
||||
oxwm.key.bind({ modkey }, "N", oxwm.layout.cycle())
|
||||
|
||||
oxwm.key.bind({ modkey, "Shift" }, "T", oxwm.spawn({ "lupan-set-theme", "toggle" }))
|
||||
|
||||
-- Master area controls (tiling layout)
|
||||
|
||||
-- Decrease/Increase master area width
|
||||
oxwm.key.bind({ modkey }, "H", oxwm.set_master_factor(-5))
|
||||
oxwm.key.bind({ modkey }, "L", oxwm.set_master_factor(5))
|
||||
-- Increment/Decrement number of master windows
|
||||
oxwm.key.bind({ modkey }, "I", oxwm.inc_num_master(1))
|
||||
oxwm.key.bind({ modkey, "Shift" }, "I", oxwm.inc_num_master(-1))
|
||||
|
||||
-- Gaps toggle
|
||||
oxwm.key.bind({ modkey }, "A", oxwm.toggle_gaps())
|
||||
|
||||
-- Window manager controls
|
||||
oxwm.key.bind({ modkey, "Shift" }, "Q", oxwm.quit())
|
||||
oxwm.key.bind({ modkey, "Shift" }, "R", oxwm.restart())
|
||||
|
||||
-- Focus movement [1 for up in the stack, -1 for down]
|
||||
oxwm.key.bind({ modkey }, "J", oxwm.client.focus_stack(1))
|
||||
oxwm.key.bind({ modkey }, "K", oxwm.client.focus_stack(-1))
|
||||
|
||||
-- Window movement (swap position in stack)
|
||||
oxwm.key.bind({ modkey, "Shift" }, "J", oxwm.client.move_stack(1))
|
||||
oxwm.key.bind({ modkey, "Shift" }, "K", oxwm.client.move_stack(-1))
|
||||
|
||||
-- Multi-monitor support
|
||||
|
||||
-- Focus next/previous Monitors
|
||||
oxwm.key.bind({ modkey }, "Comma", oxwm.monitor.focus(-1))
|
||||
oxwm.key.bind({ modkey }, "Period", oxwm.monitor.focus(1))
|
||||
-- Move window to next/previous Monitors
|
||||
oxwm.key.bind({ modkey, "Shift" }, "Comma", oxwm.monitor.tag(-1))
|
||||
oxwm.key.bind({ modkey, "Shift" }, "Period", oxwm.monitor.tag(1))
|
||||
|
||||
-- Workspace (tag) navigation
|
||||
-- Switch to workspace N (tags are 0-indexed, so tag "1" is index 0)
|
||||
oxwm.key.bind({ modkey }, "1", oxwm.tag.view(0))
|
||||
oxwm.key.bind({ modkey }, "2", oxwm.tag.view(1))
|
||||
oxwm.key.bind({ modkey }, "3", oxwm.tag.view(2))
|
||||
oxwm.key.bind({ modkey }, "4", oxwm.tag.view(3))
|
||||
oxwm.key.bind({ modkey }, "5", oxwm.tag.view(4))
|
||||
oxwm.key.bind({ modkey }, "6", oxwm.tag.view(5))
|
||||
oxwm.key.bind({ modkey }, "7", oxwm.tag.view(6))
|
||||
oxwm.key.bind({ modkey }, "8", oxwm.tag.view(7))
|
||||
oxwm.key.bind({ modkey }, "9", oxwm.tag.view(8))
|
||||
|
||||
-- Move focused window to workspace N
|
||||
oxwm.key.bind({ modkey, "Shift" }, "1", oxwm.tag.move_to(0))
|
||||
oxwm.key.bind({ modkey, "Shift" }, "2", oxwm.tag.move_to(1))
|
||||
oxwm.key.bind({ modkey, "Shift" }, "3", oxwm.tag.move_to(2))
|
||||
oxwm.key.bind({ modkey, "Shift" }, "4", oxwm.tag.move_to(3))
|
||||
oxwm.key.bind({ modkey, "Shift" }, "5", oxwm.tag.move_to(4))
|
||||
oxwm.key.bind({ modkey, "Shift" }, "6", oxwm.tag.move_to(5))
|
||||
oxwm.key.bind({ modkey, "Shift" }, "7", oxwm.tag.move_to(6))
|
||||
oxwm.key.bind({ modkey, "Shift" }, "8", oxwm.tag.move_to(7))
|
||||
oxwm.key.bind({ modkey, "Shift" }, "9", oxwm.tag.move_to(8))
|
||||
|
||||
-- Combo view (view multiple tags at once) {argos_nothing}
|
||||
-- Example: Mod+Ctrl+2 while on tag 1 will show BOTH tags 1 and 2
|
||||
oxwm.key.bind({ modkey, "Control" }, "1", oxwm.tag.toggleview(0))
|
||||
oxwm.key.bind({ modkey, "Control" }, "2", oxwm.tag.toggleview(1))
|
||||
oxwm.key.bind({ modkey, "Control" }, "3", oxwm.tag.toggleview(2))
|
||||
oxwm.key.bind({ modkey, "Control" }, "4", oxwm.tag.toggleview(3))
|
||||
oxwm.key.bind({ modkey, "Control" }, "5", oxwm.tag.toggleview(4))
|
||||
oxwm.key.bind({ modkey, "Control" }, "6", oxwm.tag.toggleview(5))
|
||||
oxwm.key.bind({ modkey, "Control" }, "7", oxwm.tag.toggleview(6))
|
||||
oxwm.key.bind({ modkey, "Control" }, "8", oxwm.tag.toggleview(7))
|
||||
oxwm.key.bind({ modkey, "Control" }, "9", oxwm.tag.toggleview(8))
|
||||
|
||||
-- Multi tag (window on multiple tags)
|
||||
-- Example: Mod+Ctrl+Shift+2 puts focused window on BOTH current tag and tag 2
|
||||
oxwm.key.bind({ modkey, "Control", "Shift" }, "1", oxwm.tag.toggletag(0))
|
||||
oxwm.key.bind({ modkey, "Control", "Shift" }, "2", oxwm.tag.toggletag(1))
|
||||
oxwm.key.bind({ modkey, "Control", "Shift" }, "3", oxwm.tag.toggletag(2))
|
||||
oxwm.key.bind({ modkey, "Control", "Shift" }, "4", oxwm.tag.toggletag(3))
|
||||
oxwm.key.bind({ modkey, "Control", "Shift" }, "5", oxwm.tag.toggletag(4))
|
||||
oxwm.key.bind({ modkey, "Control", "Shift" }, "6", oxwm.tag.toggletag(5))
|
||||
oxwm.key.bind({ modkey, "Control", "Shift" }, "7", oxwm.tag.toggletag(6))
|
||||
oxwm.key.bind({ modkey, "Control", "Shift" }, "8", oxwm.tag.toggletag(7))
|
||||
oxwm.key.bind({ modkey, "Control", "Shift" }, "9", oxwm.tag.toggletag(8))
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Advanced: Keychords
|
||||
-------------------------------------------------------------------------------
|
||||
-- Keychords allow you to bind multiple-key sequences (like Emacs or Vim)
|
||||
-- Format: {{modifiers}, key1}, {{modifiers}, key2}, ...
|
||||
-- Example: Press Mod4+Space, then release and press T to spawn a terminal
|
||||
oxwm.key.chord({
|
||||
{ { modkey }, "Space" },
|
||||
{ {}, "T" },
|
||||
}, oxwm.spawn_terminal())
|
||||
oxwm.key.chord({
|
||||
{ { modkey }, "Space" },
|
||||
{ {}, "F" },
|
||||
}, oxwm.spawn({ "firefox" }))
|
||||
oxwm.key.chord({
|
||||
{ { modkey }, "Space" },
|
||||
{ {}, "L" },
|
||||
}, oxwm.spawn({ "slock" }))
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Autostart
|
||||
-------------------------------------------------------------------------------
|
||||
-- Commands to run once when OXWM starts
|
||||
-- Uncomment and modify these examples, or add your own
|
||||
|
||||
-- oxwm.autostart("picom")
|
||||
-- oxwm.autostart("feh --bg-scale ~/wallpaper.jpg")
|
||||
-- oxwm.autostart("dunst")
|
||||
-- oxwm.autostart("nm-applet")
|
||||
14
oxwm/.config/oxwm/dark.lua
Normal file
14
oxwm/.config/oxwm/dark.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
return {
|
||||
fg = "#aaaaaa",
|
||||
red = "#f7768e",
|
||||
bg = "#1a1b26",
|
||||
black = "#1a1b26",
|
||||
cyan = "#0db9d7",
|
||||
green = "#9ece6a",
|
||||
lavender = "#a9b1d6",
|
||||
light_blue = "#7aa2f7",
|
||||
grey = "#737373",
|
||||
blue = "#6dade3",
|
||||
purple = "#ad8ee6",
|
||||
orange = "#bd6628",
|
||||
}
|
||||
14
oxwm/.config/oxwm/light.lua
Normal file
14
oxwm/.config/oxwm/light.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
return {
|
||||
fg = "#1a1b26",
|
||||
red = "#b94646",
|
||||
bg = "#dddddd",
|
||||
black = "#1a1b26",
|
||||
cyan = "#4d8080",
|
||||
green = "#9ece6a",
|
||||
lavender = "#a9b1d6",
|
||||
light_blue = "#7aa2f7",
|
||||
grey = "#bbbbbb",
|
||||
blue = "#6dade3",
|
||||
purple = "#ad8ee6",
|
||||
orange = "#d78042",
|
||||
}
|
||||
@@ -10,8 +10,8 @@
|
||||
|
||||
export LANG=pl_PL.UTF-8
|
||||
|
||||
export EDITOR=vis
|
||||
export VISUAL=vis
|
||||
export EDITOR=nvim
|
||||
export VISUAL=nvim
|
||||
|
||||
# if running bash
|
||||
if [ -n "$BASH_VERSION" ]; then
|
||||
|
||||
@@ -58,48 +58,95 @@ XTerm.vt100.color15: #ECEFF4
|
||||
|
||||
st.font: FiraCode Nerd Font:size=10
|
||||
|
||||
! kanagawa wave colors from https://github.com/rebelot/kanagawa.nvim/blob/master/extras/alacritty/kanagawa_wave.toml
|
||||
! dayfox colors from https://github.com/edeneast/nightfox.nvim/raw/main/extra/dayfox/alacritty.toml
|
||||
|
||||
Zutty.font: monaspaceneon
|
||||
Zutty.fontpath: /usr/share/fonts:HOME/.local/share/fonts
|
||||
Zutty.fontsize: 20
|
||||
|
||||
#ifdef THEME_DARK
|
||||
st.lightmode: 0
|
||||
st.background: #1f212e
|
||||
st.foreground: #9da0af
|
||||
st.cursorColor: #bf8040
|
||||
st.reverse-cursor: #1f212e
|
||||
st.color0: #1f212e
|
||||
st.color1: #862d2d
|
||||
st.color2: #3a783a
|
||||
st.color3: #707010
|
||||
st.color4: #345eb2
|
||||
st.color5: #cc66cc
|
||||
st.color6: #3a7878
|
||||
st.color7: #a1a3aa
|
||||
st.color8: #4d4d4d
|
||||
st.color9: #c27070
|
||||
st.color10: #40bf40
|
||||
st.color11: #acac53
|
||||
st.color12: #6b8ac7
|
||||
st.color13: #8f248f
|
||||
st.color14: #509595
|
||||
st.color15: #dbdff0
|
||||
st.background: #1f1f28
|
||||
st.foreground: #dcd7ba
|
||||
st.cursorColor: #cbd9d8
|
||||
st.reverse-cursor: #e6eaea
|
||||
st.color0: #090618
|
||||
st.color1: #c34043
|
||||
st.color2: #76946a
|
||||
st.color3: #c0a36e
|
||||
st.color4: #7e9cd8
|
||||
st.color5: #957fb8
|
||||
st.color6: #6a9589
|
||||
st.color7: #c8c093
|
||||
st.color8: #727169
|
||||
st.color9: #e82424
|
||||
st.color10: #98bb6c
|
||||
st.color11: #e6c384
|
||||
st.color12: #7fb4ca
|
||||
st.color13: #938aa9
|
||||
st.color14: #7aa89f
|
||||
st.color15: #dcd7ba
|
||||
|
||||
Zutty.bg: #1f1f28
|
||||
Zutty.fg: #dcd7ba
|
||||
Zutty.cr: #cbd9d8
|
||||
Zutty.color0: #090618
|
||||
Zutty.color1: #c34043
|
||||
Zutty.color2: #76946a
|
||||
Zutty.color3: #c0a36e
|
||||
Zutty.color4: #7e9cd8
|
||||
Zutty.color5: #957fb8
|
||||
Zutty.color6: #6a9589
|
||||
Zutty.color7: #c8c093
|
||||
Zutty.color8: #727169
|
||||
Zutty.color9: #e82424
|
||||
Zutty.color10: #98bb6c
|
||||
Zutty.color11: #e6c384
|
||||
Zutty.color12: #7fb4ca
|
||||
Zutty.color13: #938aa9
|
||||
Zutty.color14: #7aa89f
|
||||
Zutty.color15: #dcd7ba
|
||||
#else
|
||||
st.lightmode: 1
|
||||
st.background: #f2f2f3
|
||||
st.foreground: #1f212e
|
||||
st.cursorColor: #bf8040
|
||||
st.reverse-cursor: #1f212e
|
||||
st.color0: #1f212e
|
||||
st.color1: #862d2d
|
||||
st.color2: #3a783a
|
||||
st.color3: #707010
|
||||
st.color4: #345eb2
|
||||
st.color5: #cc66cc
|
||||
st.color6: #3a7878
|
||||
st.color7: #a1a3aa
|
||||
st.color8: #73778c
|
||||
st.color9: #c27070
|
||||
st.color10: #40bf40
|
||||
st.color11: #acac53
|
||||
st.color12: #6b8ac7
|
||||
st.color13: #8f248f
|
||||
st.color14: #509595
|
||||
st.color15: #dae4f1
|
||||
st.background: #f6f2ee
|
||||
st.foreground: #3d2b5a
|
||||
st.cursorColor: #643f61
|
||||
st.reverse-cursor: #3d2b5a
|
||||
st.color0: #352c24
|
||||
st.color1: #a5222f
|
||||
st.color2: #396847
|
||||
st.color3: #ac5402
|
||||
st.color4: #2848a9
|
||||
st.color5: #6e33ce
|
||||
st.color6: #287980
|
||||
st.color7: #f2e9e1
|
||||
st.color8: #534c45
|
||||
st.color9: #b3434e
|
||||
st.color10: #577f63
|
||||
st.color11: #b86e28
|
||||
st.color12: #4863b6
|
||||
st.color13: #8452d5
|
||||
st.color14: #488d93
|
||||
st.color15: #f4ece6
|
||||
|
||||
Zutty.bg: #f6f2ee
|
||||
Zutty.fg: #3d2b5a
|
||||
Zutty.cr: #643f61
|
||||
Zutty.color0: #352c24
|
||||
Zutty.color1: #a5222f
|
||||
Zutty.color2: #396847
|
||||
Zutty.color3: #ac5402
|
||||
Zutty.color4: #2848a9
|
||||
Zutty.color5: #6e33ce
|
||||
Zutty.color6: #287980
|
||||
Zutty.color7: #f2e9e1
|
||||
Zutty.color8: #534c45
|
||||
Zutty.color9: #b3434e
|
||||
Zutty.color10: #577f63
|
||||
Zutty.color11: #b86e28
|
||||
Zutty.color12: #4863b6
|
||||
Zutty.color13: #8452d5
|
||||
Zutty.color14: #488d93
|
||||
Zutty.color15: #f4ece6
|
||||
#endif
|
||||
|
||||
@@ -8,7 +8,7 @@ xset b off
|
||||
xrandr --auto
|
||||
xrandr --output DP-0 --left-of DP-2 --primary
|
||||
xrandr --output HDMI-0 --left-of DP-0
|
||||
xrdb -merge ~/.Xresources
|
||||
xrdb -merge ~/.Xresources -DHOME="$HOME"
|
||||
setxkbmap pl -option ctrl:nocaps
|
||||
|
||||
if [ -x ~/.fehbg ]; then
|
||||
|
||||
@@ -30,7 +30,7 @@ if [ -n "$XRES" ]; then
|
||||
elif [ "$THEME" = light ]; then
|
||||
sed -i 's/^#define THEME_DARK/#undef THEME_DARK/' "$XRES"
|
||||
fi
|
||||
xrdb -merge "$XRES"
|
||||
xrdb -merge "$XRES" -DHOME="$HOME"
|
||||
pkill -USR1 '^st$'
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user