diff --git a/nvim/.config/nvim/colors/coolurs.lua b/nvim/.config/nvim/colors/coolurs.lua deleted file mode 100644 index 049d90c..0000000 --- a/nvim/.config/nvim/colors/coolurs.lua +++ /dev/null @@ -1,4 +0,0 @@ -vim.g.colors_name = 'coolurs' - -vim.cmd('hi Normal guibg=black guifg=#ffffff') -vim.cmd('hi String guifg=#00ff00') diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 6d9ff5a..6440d3d 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -1,8 +1,10 @@ { "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" }, "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp-tw2css": { "branch": "main", "commit": "1abe0eebcb57fcbd5538d054f0db61f4e4a1302b" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, "conform.nvim": { "branch": "master", "commit": "6dc21d4ce050c2e592d9635b7983d67baf216e3d" }, "dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" }, @@ -19,9 +21,11 @@ "nvim-web-devicons": { "branch": "master", "commit": "aafa5c187a15701a7299a392b907ec15d9a7075f" }, "oil.nvim": { "branch": "master", "commit": "09fa1d22f5edf0730824d2b222d726c8c81bbdc9" }, "plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" }, + "rose-pine": { "branch": "main", "commit": "6b9840790cc7acdfadde07f308d34b62dd9cc675" }, "snacks.nvim": { "branch": "main", "commit": "706b1abc1697ca050314dc667e0900d53cad8aa4" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "dae2eac9d91464448b584c7949a31df8faefec56" }, "telescope.nvim": { "branch": "master", "commit": "415af52339215926d705cccc08145f3782c4d132" }, + "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, "vim-fugitive": { "branch": "master", "commit": "174230d6a7f2df94705a7ffd8d5413e27ec10a80" }, "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" } diff --git a/nvim/.config/nvim/lua/vxclutch/init.lua b/nvim/.config/nvim/lua/vxclutch/init.lua index d75d6d0..df0c13b 100644 --- a/nvim/.config/nvim/lua/vxclutch/init.lua +++ b/nvim/.config/nvim/lua/vxclutch/init.lua @@ -1,5 +1,3 @@ require("vxclutch.set") require("vxclutch.remap") require("vxclutch.lazy_init") - -vim.cmd.colorscheme("coolurs") diff --git a/nvim/.config/nvim/lua/vxclutch/lazy/colors.lua b/nvim/.config/nvim/lua/vxclutch/lazy/colors.lua new file mode 100644 index 0000000..2bac5ce --- /dev/null +++ b/nvim/.config/nvim/lua/vxclutch/lazy/colors.lua @@ -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, + }, +} diff --git a/nvim/.config/nvim/lua/vxclutch/lazy/lsp.lua b/nvim/.config/nvim/lua/vxclutch/lazy/lsp.lua index 263b4fc..7a0a4ed 100644 --- a/nvim/.config/nvim/lua/vxclutch/lazy/lsp.lua +++ b/nvim/.config/nvim/lua/vxclutch/lazy/lsp.lua @@ -2,23 +2,40 @@ return { { "neovim/nvim-lspconfig", dependencies = { - "williamboman/mason.nvim", - "williamboman/mason-lspconfig.nvim", + { "mason-org/mason.nvim", version = "^1.0.0" }, + { "mason-org/mason-lspconfig.nvim", version = "^1.0.0" }, "j-hui/fidget.nvim", "stevearc/conform.nvim", "hrsh7th/nvim-cmp", "hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-buffer", "hrsh7th/cmp-path", + "hrsh7th/cmp-cmdline", + "jcha0713/cmp-tw2css", "L3MON4D3/LuaSnip", "saadparwaiz1/cmp_luasnip", }, 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 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({ snippet = { expand = function(args) @@ -26,12 +43,32 @@ return { end, }, mapping = cmp.mapping.preset.insert({ - [""] = cmp.mapping.select_next_item(), - [""] = cmp.mapping.select_prev_item(), + [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }), + [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }), [""] = cmp.mapping.confirm({ select = true }), + [""] = vim.NIL, }), + window = { + completion = { + scrollbar = false, + border = "rounded", + winhighlight = "Normal:CmpNormal", + }, + documentation = { + scrollbar = false, + border = "rounded", + winhighlight = "Normal:CmpNormal", + }, + }, 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 = "buffer" }, @@ -47,10 +84,13 @@ return { require("mason").setup() require("mason-lspconfig").setup({ + automatic_installation = false, ensure_installed = { "lua_ls", "clangd", "gopls", + "rust_analyzer", + "tinymist", }, handlers = { function(server_name) @@ -79,15 +119,55 @@ return { cmd = { "clangd", "--header-insertion=iwyu" }, }) 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({ - virtual_text = true, - signs = true, - underline = true, - update_in_insert = false, - severity_sort = true, + local l = vim.lsp + l.handlers["textDocument/hover"] = function(_, result, ctx, config) + config = config or { border = "rounded", focusable = true } + config.focus_id = ctx.method + if not (result and result.contents) then return end + 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, }, diff --git a/nvim/.config/nvim/lua/vxclutch/remap.lua b/nvim/.config/nvim/lua/vxclutch/remap.lua index bdee8c1..c46cb2e 100644 --- a/nvim/.config/nvim/lua/vxclutch/remap.lua +++ b/nvim/.config/nvim/lua/vxclutch/remap.lua @@ -11,12 +11,11 @@ end -- Remove search highlight -- map("n", "", ":nohlsearch") --- Quickfix -map("n", "h", vim.lsp.buf.code_action) - -- Move lines -- -map("v", "J", ":m '>+1gv=gv") -map("v", "K", ":m '>-2gv=gv") +map("n", "", ":m .+1==") +map("n", "", ":m .-2==") +map("v", "", ":m '>+1gv=gv") +map("v", "", ":m '<-2gv=gv") -- Scrolling -- map("n", "", "zz") @@ -25,29 +24,9 @@ map("n", "", "zz") -- File navigation -- map("n", "pv", ":Oil") --- Terminal -- -map("t", "", "") -map("t", "", ":bd!") - --- Exec -map("n", "x", ":.lua") -map("n", "x", ":source %") - -- LSP map("n", "gd", vim.lsp.buf.definition) map("n", "rn", vim.lsp.buf.rename, { noremap = true, silent = true }) -map('n', '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 map("n", "", "") diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 675c110..b8d45fb 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -1,50 +1,34 @@ set -s escape-time 0 +set -g escape-time 0 set-option -sa terminal-features ',xterm-256color:RGB' set-option -g allow-passthrough on + unbind C-b -set-option -g prefix C-SPACE -bind-key C-SPACE send-prefix -bind r source-file ~/.config/tmux/tmux.conf -set -g base-index 1 +set-option -g prefix C-s +bind-key C-s send-prefix +bind r source-file ~/.tmux.conf -# 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 j select-pane -D bind -r h select-pane -L bind -r l select-pane -R +bind -r ^ last-window -# Scripts that are baked into tmux -bind G new-window -n 'lazygit' lazygit -bind-key f run-shell "tmux neww ~/.config/scripts/tmux-sessionizer.sh" -bind-key F run-shell "tmux display-popup -E ~/.config/scripts/clone.sh" -bind-key O run-shell "tmux neww ~/.config/scripts/op.sh" -bind-key o run-shell "tmux neww ~/.config/scripts/oa.sh" -bind-key g run-shell "~/.config/scripts/open_github.sh" -bind-key -r N run-shell "~/.config/scripts/tmux-sessionizer.sh ~/documents/notes" -bind-key -r P run-shell "~/.config/scripts/tmux-sessionizer.sh ~/documents/projects" -bind-key -r D run-shell "~/.config/scripts/tmux-sessionizer.sh ~/.config" -bind-key -r H run-shell "~/.config/scripts/tmux-sessionizer.sh ~" -bind-key -r K run-shell "~/.config/scripts/tmux-sessionizer.sh ~/qmk_firmware/keyboards/ferris/keymaps/sylvanfranklinferrissweep" -bind-key -r J run-shell "~/.config/scripts/tmux-sessionizer.sh ~/Journal" -bind-key b set-option status +set -g base-index 1 +set -g renumber-windows on +set-window-option -g mode-keys vi + +set -g status-position top +set -g status-justify centre +set -g status-style fg=colour8,bg=#000000 +set -g status-left-style fg=colour8,bg=#000000 +set -g status-right-style fg=colour8,bg=#000000 + +set -g status-left '#(echo "#{pane_current_path}" | sed "s|^/home/||")' +set -g status-right '%H:%M' + +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'