From 8be2f42abaa405e8fa023832c891ad37fbe3cda4 Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 2 Jul 2024 04:17:00 -0400 Subject: [PATCH] Remove pnpm from path, and use typescript-tools, and other refactors --- .../functions/define_global_variables.fish | 3 --- .config/nvim/init.lua | 27 ++++++++++++------- .config/sxhkd/sxhkdrc | 2 +- .vimrc | 15 +++++------ .wezterm.lua | 18 ++++++------- scripts/glance | 2 +- scripts/jmpv | 2 +- scripts/redisco | 2 +- scripts/sesh | 2 +- scripts/vban | 2 +- scripts/ytmpv | 2 +- 11 files changed, 40 insertions(+), 37 deletions(-) diff --git a/.config/fish/functions/define_global_variables.fish b/.config/fish/functions/define_global_variables.fish index c3d027a..ab164de 100644 --- a/.config/fish/functions/define_global_variables.fish +++ b/.config/fish/functions/define_global_variables.fish @@ -22,8 +22,6 @@ function define_global_variables -d 'Defines all and exclusively globally export set -gx LIBVA_DRIVER_NAME nvidia - set -gx PNPM_HOME $HOME/.local/share/pnpm - fish_add_path $GOBIN \ $HOME/.local/bin \ $HOME/.pub-cache/bin \ @@ -32,7 +30,6 @@ function define_global_variables -d 'Defines all and exclusively globally export $HOME/.cargo/bin \ $HOME/.dotnet/tools \ $BUN_INSTALL/bin \ - $PNPM_HOME \ $ANDROID_HOME/emulator \ $ANDROID_HOME/platform-tools \ $ANDROID_HOME/build-tools/31.0.0 \ diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 8936c80..471c644 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -13,6 +13,11 @@ vim.api.nvim_create_autocmd("TermOpen", { command = "set nonumber", }) +require("gruvbox").setup({ + transparent_mode = true, +}) +vim.cmd("colorscheme gruvbox") + require("twilight").setup() require("zen-mode").setup({ window = { @@ -57,7 +62,6 @@ require("nvim-treesitter.configs").setup({ "c", "lua", "vim", - "help", "fish", "typescript", "javascript", @@ -134,21 +138,24 @@ local lsp_flags = { debounce_text_changes = 150, } +-- Unused for now local vue_plugin_location = vim.fn.expand("$HOME/.bun/install/global/node_modules/@vue/language-server") -lspconfig.tsserver.setup(coq.lsp_ensure_capabilities({ +require("typescript-tools").setup(coq.lsp_ensure_capabilities({ on_attach = on_attach, flags = lsp_flags, - init_options = { - plugins = { - { - name = "@vue/typescript-plugin", - location = vue_plugin_location, - languages = { "vue" }, - }, + filetypes = { + "typescript", + "javascript", + "javascriptreact", + "typescriptreact", + "vue", + }, + settings = { + tsserver_plugins = { + "@vue/typescript-plugin", }, }, - filetypes = { "typescript", "javascript", "javascriptreact", "typescriptreact", "vue" }, })) local servers = { "volar", "elixirls", "gopls", "pylsp" } diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 5e2c094..80c12dc 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -10,7 +10,7 @@ super + Return super + shift + Return firefox -super + alt + shift + Return +super + shift + ctrl + Return qutebrowser # program launcher diff --git a/.vimrc b/.vimrc index 6749b70..bb823b3 100644 --- a/.vimrc +++ b/.vimrc @@ -38,6 +38,7 @@ if !exists('g:vscode') Plug 'nvim-telescope/telescope-fzf-native.nvim', { \ 'do': 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' \ } + Plug 'pmizio/typescript-tools.nvim' else Plug 'morhetz/gruvbox' Plug 'junegunn/fzf' @@ -123,7 +124,7 @@ vnoremap // y/\V=escape(@",'/\') let g:gruvbox_italic=1 colorscheme gruvbox -highlight Normal guibg=None ctermbg=None +highlight Normal ctermbg=None let g:ackprg = 'ag --nogroup --nocolor --column --hidden' @@ -133,8 +134,10 @@ let g:lightline = { let g:ale_linters = { \ 'javascript': ['eslint', 'stylelint'], - \ 'go': ['golint', 'go vet'], \ 'typescript': ['eslint', 'stylelint'], + \ 'javascriptreact': ['eslint', 'stylelint'], + \ 'typescriptreact': ['eslint', 'stylelint'], + \ 'go': ['golint', 'go vet'], \ 'vue': ['eslint', 'stylelint'], \ 'make': ['checkmake'], \ 'proto': ['protoc-gen-lint'], @@ -157,6 +160,8 @@ let g:ale_fixers = { \ 'graphql': ['prettier'], \ 'javascript': ['prettier'], \ 'typescript': ['prettier'], + \ 'javascriptreact': ['prettier'], + \ 'typescriptreact': ['prettier'], \ 'vue': ['prettier'], \ 'css': ['prettier'], \ 'yaml': ['prettier'], @@ -182,12 +187,6 @@ let g:pencil#map#suspend_af = 'K' let g:nnn#layout = {'left': '~20%'} let g:nnn#command = 'nnn -eHo' -augroup ft_jsx - au! - autocmd BufNewFile,BufRead *.jsx set filetype=javascript.jsx - autocmd BufNewFile,BufRead *.tsx set filetype=typescript.tsx -augroup END - augroup ft_fish au! autocmd FileType fish set tabstop=4 diff --git a/.wezterm.lua b/.wezterm.lua index 998175e..eb6b4b4 100644 --- a/.wezterm.lua +++ b/.wezterm.lua @@ -18,17 +18,17 @@ config.hide_tab_bar_if_only_one_tab = true config.keys = { { key = "Enter", mods = "SHIFT|CTRL", action = act.SplitVertical({ domain = "CurrentPaneDomain" }) }, { key = '"', mods = "SHIFT|CTRL", action = act.SplitHorizontal({ domain = "CurrentPaneDomain" }) }, + { key = "H", mods = "SHIFT|CTRL", action = act.ActivatePaneDirection("Left") }, + { key = "L", mods = "SHIFT|CTRL", action = act.ActivatePaneDirection("Right") }, + { key = "K", mods = "SHIFT|CTRL", action = act.ActivatePaneDirection("Up") }, + { key = "J", mods = "SHIFT|CTRL", action = act.ActivatePaneDirection("Down") }, + { key = "H", mods = "SHIFT|CTRL|SUPER", action = act.AdjustPaneSize({ "Left", 1 }) }, + { key = "L", mods = "SHIFT|CTRL|SUPER", action = act.AdjustPaneSize({ "Right", 1 }) }, + { key = "K", mods = "SHIFT|CTRL|SUPER", action = act.AdjustPaneSize({ "Up", 1 }) }, + { key = "J", mods = "SHIFT|CTRL|SUPER", action = act.AdjustPaneSize({ "Down", 1 }) }, + { key = "D", mods = "SHIFT|CTRL|SUPER", action = act.ShowDebugOverlay }, { key = "X", mods = "SHIFT|CTRL|ALT", action = act.ActivateCopyMode }, { key = "Z", mods = "SHIFT|CTRL|ALT", action = act.TogglePaneZoomState }, - { key = "H", mods = "SHIFT|CTRL", action = act.ActivatePaneDirection("Left") }, - { key = "H", mods = "SHIFT|ALT|CTRL", action = act.AdjustPaneSize({ "Left", 1 }) }, - { key = "L", mods = "SHIFT|CTRL", action = act.ActivatePaneDirection("Right") }, - { key = "L", mods = "SHIFT|ALT|CTRL", action = act.AdjustPaneSize({ "Right", 1 }) }, - { key = "K", mods = "SHIFT|CTRL", action = act.ActivatePaneDirection("Up") }, - { key = "K", mods = "SHIFT|ALT|CTRL", action = act.AdjustPaneSize({ "Up", 1 }) }, - { key = "J", mods = "SHIFT|CTRL", action = act.ActivatePaneDirection("Down") }, - { key = "J", mods = "SHIFT|ALT|CTRL", action = act.AdjustPaneSize({ "Down", 1 }) }, - { key = "D", mods = "SHIFT|ALT|CTRL", action = act.ShowDebugOverlay }, } return config diff --git a/scripts/glance b/scripts/glance index 5e40044..6b5aae2 100755 --- a/scripts/glance +++ b/scripts/glance @@ -1,2 +1,2 @@ #!/bin/sh -wezterm start fish -c glance +wezterm start -- fish -c glance diff --git a/scripts/jmpv b/scripts/jmpv index 8a55520..3fa29d8 100755 --- a/scripts/jmpv +++ b/scripts/jmpv @@ -1,2 +1,2 @@ #!/usr/bin/sh -wezterm start fish -c jmpv +wezterm start -- fish -c jmpv diff --git a/scripts/redisco b/scripts/redisco index 3a91000..9708960 100755 --- a/scripts/redisco +++ b/scripts/redisco @@ -1,2 +1,2 @@ #!/usr/bin/env fish -wezterm start fish -c "redisco $argv" +wezterm start -- fish -c "redisco $argv" diff --git a/scripts/sesh b/scripts/sesh index 2d51558..5abdf42 100755 --- a/scripts/sesh +++ b/scripts/sesh @@ -1,2 +1,2 @@ #!/usr/bin/env fish -wezterm start fish -c "sesh $argv" +wezterm start -- fish -c "sesh $argv" diff --git a/scripts/vban b/scripts/vban index f4d7ee4..4816991 100755 --- a/scripts/vban +++ b/scripts/vban @@ -1,2 +1,2 @@ #!/usr/bin/sh -wezterm start fish -c vban +wezterm start -- fish -c vban diff --git a/scripts/ytmpv b/scripts/ytmpv index 61b89b5..d90ef84 100755 --- a/scripts/ytmpv +++ b/scripts/ytmpv @@ -1,2 +1,2 @@ #!/usr/bin/sh -wezterm start fish -c ytmpv +wezterm start -- fish -c ytmpv