save
This commit is contained in:
@@ -1,4 +0,0 @@
|
|||||||
vim.g.colors_name = 'coolurs'
|
|
||||||
|
|
||||||
vim.cmd('hi Normal guibg=black guifg=#ffffff')
|
|
||||||
vim.cmd('hi String guifg=#00ff00')
|
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
|
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
|
"cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
|
"cmp-tw2css": { "branch": "main", "commit": "1abe0eebcb57fcbd5538d054f0db61f4e4a1302b" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "6dc21d4ce050c2e592d9635b7983d67baf216e3d" },
|
"conform.nvim": { "branch": "master", "commit": "6dc21d4ce050c2e592d9635b7983d67baf216e3d" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" },
|
"dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" },
|
||||||
@@ -19,9 +21,11 @@
|
|||||||
"nvim-web-devicons": { "branch": "master", "commit": "aafa5c187a15701a7299a392b907ec15d9a7075f" },
|
"nvim-web-devicons": { "branch": "master", "commit": "aafa5c187a15701a7299a392b907ec15d9a7075f" },
|
||||||
"oil.nvim": { "branch": "master", "commit": "09fa1d22f5edf0730824d2b222d726c8c81bbdc9" },
|
"oil.nvim": { "branch": "master", "commit": "09fa1d22f5edf0730824d2b222d726c8c81bbdc9" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" },
|
"plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" },
|
||||||
|
"rose-pine": { "branch": "main", "commit": "6b9840790cc7acdfadde07f308d34b62dd9cc675" },
|
||||||
"snacks.nvim": { "branch": "main", "commit": "706b1abc1697ca050314dc667e0900d53cad8aa4" },
|
"snacks.nvim": { "branch": "main", "commit": "706b1abc1697ca050314dc667e0900d53cad8aa4" },
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "dae2eac9d91464448b584c7949a31df8faefec56" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "dae2eac9d91464448b584c7949a31df8faefec56" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "415af52339215926d705cccc08145f3782c4d132" },
|
"telescope.nvim": { "branch": "master", "commit": "415af52339215926d705cccc08145f3782c4d132" },
|
||||||
|
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||||
"vim-fugitive": { "branch": "master", "commit": "174230d6a7f2df94705a7ffd8d5413e27ec10a80" },
|
"vim-fugitive": { "branch": "master", "commit": "174230d6a7f2df94705a7ffd8d5413e27ec10a80" },
|
||||||
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }
|
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
require("vxclutch.set")
|
require("vxclutch.set")
|
||||||
require("vxclutch.remap")
|
require("vxclutch.remap")
|
||||||
require("vxclutch.lazy_init")
|
require("vxclutch.lazy_init")
|
||||||
|
|
||||||
vim.cmd.colorscheme("coolurs")
|
|
||||||
|
|||||||
33
nvim/.config/nvim/lua/vxclutch/lazy/colors.lua
Normal file
33
nvim/.config/nvim/lua/vxclutch/lazy/colors.lua
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
function ColorMyPencils(color)
|
||||||
|
color = color or "rose-pine"
|
||||||
|
vim.cmd.colorscheme(color)
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/tokyonight.nvim",
|
||||||
|
config = function()
|
||||||
|
require("tokyonight").setup({
|
||||||
|
style = "storm",
|
||||||
|
transparent = true,
|
||||||
|
terminal_colors = true,
|
||||||
|
styles = {
|
||||||
|
comments = { italic = false },
|
||||||
|
keywords = { italic = false },
|
||||||
|
sidebars = "dark",
|
||||||
|
floats = "dark",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rose-pine/neovim",
|
||||||
|
name = "rose-pine",
|
||||||
|
config = function()
|
||||||
|
require("rose-pine").setup({ disable_background = true })
|
||||||
|
|
||||||
|
vim.cmd("colorscheme rose-pine")
|
||||||
|
ColorMyPencils()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -2,23 +2,40 @@ return {
|
|||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"williamboman/mason.nvim",
|
{ "mason-org/mason.nvim", version = "^1.0.0" },
|
||||||
"williamboman/mason-lspconfig.nvim",
|
{ "mason-org/mason-lspconfig.nvim", version = "^1.0.0" },
|
||||||
"j-hui/fidget.nvim",
|
"j-hui/fidget.nvim",
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
"hrsh7th/cmp-buffer",
|
"hrsh7th/cmp-buffer",
|
||||||
"hrsh7th/cmp-path",
|
"hrsh7th/cmp-path",
|
||||||
|
"hrsh7th/cmp-cmdline",
|
||||||
|
"jcha0713/cmp-tw2css",
|
||||||
"L3MON4D3/LuaSnip",
|
"L3MON4D3/LuaSnip",
|
||||||
"saadparwaiz1/cmp_luasnip",
|
"saadparwaiz1/cmp_luasnip",
|
||||||
},
|
},
|
||||||
|
|
||||||
config = function()
|
config = function()
|
||||||
|
vim.diagnostic.config({
|
||||||
|
virtual_text = true,
|
||||||
|
signs = true,
|
||||||
|
underline = true,
|
||||||
|
update_in_insert = false,
|
||||||
|
severity_sort = true,
|
||||||
|
float = { border = "rounded" },
|
||||||
|
})
|
||||||
|
|
||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
local luasnip = require("luasnip")
|
local luasnip = require("luasnip")
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
local cmp_lsp = require("cmp_nvim_lsp")
|
||||||
|
local capabilities = vim.tbl_deep_extend(
|
||||||
|
"force",
|
||||||
|
vim.lsp.protocol.make_client_capabilities(),
|
||||||
|
cmp_lsp.default_capabilities()
|
||||||
|
)
|
||||||
|
|
||||||
|
vim.api.nvim_set_hl(0, "CmpNormal", {})
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
snippet = {
|
snippet = {
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
@@ -26,12 +43,32 @@ return {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }),
|
||||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }),
|
||||||
["<C-y>"] = cmp.mapping.confirm({ select = true }),
|
["<C-y>"] = cmp.mapping.confirm({ select = true }),
|
||||||
|
["<C-e>"] = vim.NIL,
|
||||||
}),
|
}),
|
||||||
|
window = {
|
||||||
|
completion = {
|
||||||
|
scrollbar = false,
|
||||||
|
border = "rounded",
|
||||||
|
winhighlight = "Normal:CmpNormal",
|
||||||
|
},
|
||||||
|
documentation = {
|
||||||
|
scrollbar = false,
|
||||||
|
border = "rounded",
|
||||||
|
winhighlight = "Normal:CmpNormal",
|
||||||
|
},
|
||||||
|
},
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = "nvim_lsp" },
|
{
|
||||||
|
name = "nvim_lsp",
|
||||||
|
max_item_count = 5,
|
||||||
|
entry_filter = function(entry, _)
|
||||||
|
return cmp.lsp.CompletionItemKind.Snippet ~= entry:get_kind()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ name = "cmp-tw2css" },
|
||||||
{ name = "luasnip" },
|
{ name = "luasnip" },
|
||||||
}, {
|
}, {
|
||||||
{ name = "buffer" },
|
{ name = "buffer" },
|
||||||
@@ -47,10 +84,13 @@ return {
|
|||||||
require("mason").setup()
|
require("mason").setup()
|
||||||
|
|
||||||
require("mason-lspconfig").setup({
|
require("mason-lspconfig").setup({
|
||||||
|
automatic_installation = false,
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"lua_ls",
|
"lua_ls",
|
||||||
"clangd",
|
"clangd",
|
||||||
"gopls",
|
"gopls",
|
||||||
|
"rust_analyzer",
|
||||||
|
"tinymist",
|
||||||
},
|
},
|
||||||
handlers = {
|
handlers = {
|
||||||
function(server_name)
|
function(server_name)
|
||||||
@@ -79,15 +119,55 @@ return {
|
|||||||
cmd = { "clangd", "--header-insertion=iwyu" },
|
cmd = { "clangd", "--header-insertion=iwyu" },
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
["svelte"] = function()
|
||||||
|
require("lspconfig").svelte.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = function(client, bufnr)
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||||
|
pattern = { "*.js", "*.ts" },
|
||||||
|
callback = function(ctx)
|
||||||
|
client.notify("$/onDidChangeTsOrJsFile", { uri = ctx.match })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
|
||||||
|
["tinymist"] = function()
|
||||||
|
require("lspconfig").tinymist.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
settings = {
|
||||||
|
formatterMode = "typstyle",
|
||||||
|
exportPdf = "never",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.diagnostic.config({
|
local l = vim.lsp
|
||||||
virtual_text = true,
|
l.handlers["textDocument/hover"] = function(_, result, ctx, config)
|
||||||
signs = true,
|
config = config or { border = "rounded", focusable = true }
|
||||||
underline = true,
|
config.focus_id = ctx.method
|
||||||
update_in_insert = false,
|
if not (result and result.contents) then return end
|
||||||
severity_sort = true,
|
local markdown_lines = l.util.convert_input_to_markdown_lines(result.contents)
|
||||||
|
markdown_lines = vim.tbl_filter(function(line) return line ~= "" end, markdown_lines)
|
||||||
|
if vim.tbl_isempty(markdown_lines) then return end
|
||||||
|
return l.util.open_floating_preview(markdown_lines, "markdown", config)
|
||||||
|
end
|
||||||
|
|
||||||
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
|
autocmd({ "BufEnter", "BufWinEnter" }, {
|
||||||
|
pattern = { "*.vert", "*.frag" },
|
||||||
|
callback = function() vim.cmd("set filetype=glsl") end,
|
||||||
|
})
|
||||||
|
|
||||||
|
autocmd("LspAttach", {
|
||||||
|
callback = function(e)
|
||||||
|
local opts = { buffer = e.buf }
|
||||||
|
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,12 +11,11 @@ end
|
|||||||
-- Remove search highlight --
|
-- Remove search highlight --
|
||||||
map("n", "<Esc>", ":nohlsearch<CR>")
|
map("n", "<Esc>", ":nohlsearch<CR>")
|
||||||
|
|
||||||
-- Quickfix
|
|
||||||
map("n", "<leader>h", vim.lsp.buf.code_action)
|
|
||||||
|
|
||||||
-- Move lines --
|
-- Move lines --
|
||||||
map("v", "J", ":m '>+1<CR>gv=gv")
|
map("n", "<A-j>", ":m .+1<CR>==")
|
||||||
map("v", "K", ":m '>-2<CR>gv=gv")
|
map("n", "<A-k>", ":m .-2<CR>==")
|
||||||
|
map("v", "<A-j>", ":m '>+1<CR>gv=gv")
|
||||||
|
map("v", "<A-k>", ":m '<-2<CR>gv=gv")
|
||||||
|
|
||||||
-- Scrolling --
|
-- Scrolling --
|
||||||
map("n", "<C-d>", "<C-d>zz")
|
map("n", "<C-d>", "<C-d>zz")
|
||||||
@@ -25,29 +24,9 @@ map("n", "<C-u>", "<C-u>zz")
|
|||||||
-- File navigation --
|
-- File navigation --
|
||||||
map("n", "<leader>pv", ":Oil<CR>")
|
map("n", "<leader>pv", ":Oil<CR>")
|
||||||
|
|
||||||
-- Terminal --
|
|
||||||
map("t", "<C-k>", "<C-\\><C-n><C-w><C-k>")
|
|
||||||
map("t", "<C-Space>", "<C-\\><C-n>:bd!<CR>")
|
|
||||||
|
|
||||||
-- Exec
|
|
||||||
map("n", "<leader>x", ":.lua<CR>")
|
|
||||||
map("n", "<leader><leader>x", ":source %<CR>")
|
|
||||||
|
|
||||||
-- LSP
|
-- LSP
|
||||||
map("n", "gd", vim.lsp.buf.definition)
|
map("n", "gd", vim.lsp.buf.definition)
|
||||||
map("n", "<leader>rn", vim.lsp.buf.rename, { noremap = true, silent = true })
|
map("n", "<leader>rn", vim.lsp.buf.rename, { noremap = true, silent = true })
|
||||||
map('n', '<leader>h', function()
|
|
||||||
local diag = vim.diagnostic.get(0) -- Get diagnostics for the current buffer
|
|
||||||
if #diag > 0 then
|
|
||||||
-- Try to resolve the first diagnostic (you can adjust logic for more advanced fixing)
|
|
||||||
vim.lsp.buf.code_action({
|
|
||||||
filter = function(action)
|
|
||||||
return action.kind == "quickfix"
|
|
||||||
end
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end, { desc = "LSP Quickfix for Current Diagnostic" })
|
|
||||||
|
|
||||||
|
|
||||||
-- Window Controls
|
-- Window Controls
|
||||||
map("n", "<C-h>", "<C-w><C-h>")
|
map("n", "<C-h>", "<C-w><C-h>")
|
||||||
|
|||||||
@@ -1,50 +1,34 @@
|
|||||||
set -s escape-time 0
|
set -s escape-time 0
|
||||||
|
set -g escape-time 0
|
||||||
set-option -sa terminal-features ',xterm-256color:RGB'
|
set-option -sa terminal-features ',xterm-256color:RGB'
|
||||||
set-option -g allow-passthrough on
|
set-option -g allow-passthrough on
|
||||||
|
|
||||||
unbind C-b
|
unbind C-b
|
||||||
set-option -g prefix C-SPACE
|
set-option -g prefix C-s
|
||||||
bind-key C-SPACE send-prefix
|
bind-key C-s send-prefix
|
||||||
bind r source-file ~/.config/tmux/tmux.conf
|
bind r source-file ~/.tmux.conf
|
||||||
set -g base-index 1
|
|
||||||
|
|
||||||
# set-option remain-on-exit on
|
|
||||||
set -g renumber-windows on # renumber all windows when any window is closed
|
|
||||||
set -g escape-time 0 # zero-out escape time delay
|
|
||||||
set-window-option -g mode-keys vi
|
|
||||||
|
|
||||||
# style
|
|
||||||
set -g status-position top
|
|
||||||
set -g status-justify absolute-centre
|
|
||||||
set -g status-style 'fg=color7 bg=default'
|
|
||||||
set -g status-right ''
|
|
||||||
# set -g status-right ' #(cd #{pane_current_path}; git rev-parse --abbrev-ref HEAD)'
|
|
||||||
# set -g status-right ''
|
|
||||||
set -g status-left '#S'
|
|
||||||
set -g status-left-style 'fg=color8'
|
|
||||||
set -g status-right-length 0
|
|
||||||
set -g status-left-length 100
|
|
||||||
setw -g window-status-current-style 'fg=colour1 bg=default bold'
|
|
||||||
setw -g window-status-current-format '#I:#W '
|
|
||||||
setw -g window-status-style 'fg=color8'
|
|
||||||
|
|
||||||
# vim-like pane switching
|
|
||||||
bind -r ^ last-window
|
|
||||||
bind -r k select-pane -U
|
bind -r k select-pane -U
|
||||||
bind -r j select-pane -D
|
bind -r j select-pane -D
|
||||||
bind -r h select-pane -L
|
bind -r h select-pane -L
|
||||||
bind -r l select-pane -R
|
bind -r l select-pane -R
|
||||||
|
bind -r ^ last-window
|
||||||
|
|
||||||
# Scripts that are baked into tmux
|
set -g base-index 1
|
||||||
bind G new-window -n 'lazygit' lazygit
|
set -g renumber-windows on
|
||||||
bind-key f run-shell "tmux neww ~/.config/scripts/tmux-sessionizer.sh"
|
set-window-option -g mode-keys vi
|
||||||
bind-key F run-shell "tmux display-popup -E ~/.config/scripts/clone.sh"
|
|
||||||
bind-key O run-shell "tmux neww ~/.config/scripts/op.sh"
|
set -g status-position top
|
||||||
bind-key o run-shell "tmux neww ~/.config/scripts/oa.sh"
|
set -g status-justify centre
|
||||||
bind-key g run-shell "~/.config/scripts/open_github.sh"
|
set -g status-style fg=colour8,bg=#000000
|
||||||
bind-key -r N run-shell "~/.config/scripts/tmux-sessionizer.sh ~/documents/notes"
|
set -g status-left-style fg=colour8,bg=#000000
|
||||||
bind-key -r P run-shell "~/.config/scripts/tmux-sessionizer.sh ~/documents/projects"
|
set -g status-right-style fg=colour8,bg=#000000
|
||||||
bind-key -r D run-shell "~/.config/scripts/tmux-sessionizer.sh ~/.config"
|
|
||||||
bind-key -r H run-shell "~/.config/scripts/tmux-sessionizer.sh ~"
|
set -g status-left '#(echo "#{pane_current_path}" | sed "s|^/home/||")'
|
||||||
bind-key -r K run-shell "~/.config/scripts/tmux-sessionizer.sh ~/qmk_firmware/keyboards/ferris/keymaps/sylvanfranklinferrissweep"
|
set -g status-right '%H:%M'
|
||||||
bind-key -r J run-shell "~/.config/scripts/tmux-sessionizer.sh ~/Journal"
|
|
||||||
bind-key b set-option status
|
setw -g window-status-style fg=colour8,bg=#000000
|
||||||
|
setw -g window-status-format '#I:#W '
|
||||||
|
|
||||||
|
setw -g window-status-current-style fg=colour1,bg=#000000,bold
|
||||||
|
set -g status-right '%I:%M %p'
|
||||||
|
|||||||
Reference in New Issue
Block a user