Remove pnpm from path, and use typescript-tools, and other refactors

This commit is contained in:
mitchell 2024-07-02 04:17:00 -04:00
parent 547dea2d9d
commit 8be2f42aba
11 changed files with 40 additions and 37 deletions

View File

@ -22,8 +22,6 @@ function define_global_variables -d 'Defines all and exclusively globally export
set -gx LIBVA_DRIVER_NAME nvidia set -gx LIBVA_DRIVER_NAME nvidia
set -gx PNPM_HOME $HOME/.local/share/pnpm
fish_add_path $GOBIN \ fish_add_path $GOBIN \
$HOME/.local/bin \ $HOME/.local/bin \
$HOME/.pub-cache/bin \ $HOME/.pub-cache/bin \
@ -32,7 +30,6 @@ function define_global_variables -d 'Defines all and exclusively globally export
$HOME/.cargo/bin \ $HOME/.cargo/bin \
$HOME/.dotnet/tools \ $HOME/.dotnet/tools \
$BUN_INSTALL/bin \ $BUN_INSTALL/bin \
$PNPM_HOME \
$ANDROID_HOME/emulator \ $ANDROID_HOME/emulator \
$ANDROID_HOME/platform-tools \ $ANDROID_HOME/platform-tools \
$ANDROID_HOME/build-tools/31.0.0 \ $ANDROID_HOME/build-tools/31.0.0 \

View File

@ -13,6 +13,11 @@ vim.api.nvim_create_autocmd("TermOpen", {
command = "set nonumber", command = "set nonumber",
}) })
require("gruvbox").setup({
transparent_mode = true,
})
vim.cmd("colorscheme gruvbox")
require("twilight").setup() require("twilight").setup()
require("zen-mode").setup({ require("zen-mode").setup({
window = { window = {
@ -57,7 +62,6 @@ require("nvim-treesitter.configs").setup({
"c", "c",
"lua", "lua",
"vim", "vim",
"help",
"fish", "fish",
"typescript", "typescript",
"javascript", "javascript",
@ -134,21 +138,24 @@ local lsp_flags = {
debounce_text_changes = 150, debounce_text_changes = 150,
} }
-- Unused for now
local vue_plugin_location = vim.fn.expand("$HOME/.bun/install/global/node_modules/@vue/language-server") 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, on_attach = on_attach,
flags = lsp_flags, flags = lsp_flags,
init_options = { filetypes = {
plugins = { "typescript",
{ "javascript",
name = "@vue/typescript-plugin", "javascriptreact",
location = vue_plugin_location, "typescriptreact",
languages = { "vue" }, "vue",
}, },
settings = {
tsserver_plugins = {
"@vue/typescript-plugin",
}, },
}, },
filetypes = { "typescript", "javascript", "javascriptreact", "typescriptreact", "vue" },
})) }))
local servers = { "volar", "elixirls", "gopls", "pylsp" } local servers = { "volar", "elixirls", "gopls", "pylsp" }

View File

@ -10,7 +10,7 @@ super + Return
super + shift + Return super + shift + Return
firefox firefox
super + alt + shift + Return super + shift + ctrl + Return
qutebrowser qutebrowser
# program launcher # program launcher

15
.vimrc
View File

@ -38,6 +38,7 @@ if !exists('g:vscode')
Plug 'nvim-telescope/telescope-fzf-native.nvim', { 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' \ 'do': 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build'
\ } \ }
Plug 'pmizio/typescript-tools.nvim'
else else
Plug 'morhetz/gruvbox' Plug 'morhetz/gruvbox'
Plug 'junegunn/fzf' Plug 'junegunn/fzf'
@ -123,7 +124,7 @@ vnoremap // y/\V<C-R>=escape(@",'/\')<CR><CR>
let g:gruvbox_italic=1 let g:gruvbox_italic=1
colorscheme gruvbox colorscheme gruvbox
highlight Normal guibg=None ctermbg=None highlight Normal ctermbg=None
let g:ackprg = 'ag --nogroup --nocolor --column --hidden' let g:ackprg = 'ag --nogroup --nocolor --column --hidden'
@ -133,8 +134,10 @@ let g:lightline = {
let g:ale_linters = { let g:ale_linters = {
\ 'javascript': ['eslint', 'stylelint'], \ 'javascript': ['eslint', 'stylelint'],
\ 'go': ['golint', 'go vet'],
\ 'typescript': ['eslint', 'stylelint'], \ 'typescript': ['eslint', 'stylelint'],
\ 'javascriptreact': ['eslint', 'stylelint'],
\ 'typescriptreact': ['eslint', 'stylelint'],
\ 'go': ['golint', 'go vet'],
\ 'vue': ['eslint', 'stylelint'], \ 'vue': ['eslint', 'stylelint'],
\ 'make': ['checkmake'], \ 'make': ['checkmake'],
\ 'proto': ['protoc-gen-lint'], \ 'proto': ['protoc-gen-lint'],
@ -157,6 +160,8 @@ let g:ale_fixers = {
\ 'graphql': ['prettier'], \ 'graphql': ['prettier'],
\ 'javascript': ['prettier'], \ 'javascript': ['prettier'],
\ 'typescript': ['prettier'], \ 'typescript': ['prettier'],
\ 'javascriptreact': ['prettier'],
\ 'typescriptreact': ['prettier'],
\ 'vue': ['prettier'], \ 'vue': ['prettier'],
\ 'css': ['prettier'], \ 'css': ['prettier'],
\ 'yaml': ['prettier'], \ 'yaml': ['prettier'],
@ -182,12 +187,6 @@ let g:pencil#map#suspend_af = 'K'
let g:nnn#layout = {'left': '~20%'} let g:nnn#layout = {'left': '~20%'}
let g:nnn#command = 'nnn -eHo' 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 augroup ft_fish
au! au!
autocmd FileType fish set tabstop=4 autocmd FileType fish set tabstop=4

View File

@ -18,17 +18,17 @@ config.hide_tab_bar_if_only_one_tab = true
config.keys = { config.keys = {
{ key = "Enter", mods = "SHIFT|CTRL", action = act.SplitVertical({ domain = "CurrentPaneDomain" }) }, { key = "Enter", mods = "SHIFT|CTRL", action = act.SplitVertical({ domain = "CurrentPaneDomain" }) },
{ key = '"', mods = "SHIFT|CTRL", action = act.SplitHorizontal({ 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 = "X", mods = "SHIFT|CTRL|ALT", action = act.ActivateCopyMode },
{ key = "Z", mods = "SHIFT|CTRL|ALT", action = act.TogglePaneZoomState }, { 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 return config

View File

@ -1,2 +1,2 @@
#!/bin/sh #!/bin/sh
wezterm start fish -c glance wezterm start -- fish -c glance

View File

@ -1,2 +1,2 @@
#!/usr/bin/sh #!/usr/bin/sh
wezterm start fish -c jmpv wezterm start -- fish -c jmpv

View File

@ -1,2 +1,2 @@
#!/usr/bin/env fish #!/usr/bin/env fish
wezterm start fish -c "redisco $argv" wezterm start -- fish -c "redisco $argv"

View File

@ -1,2 +1,2 @@
#!/usr/bin/env fish #!/usr/bin/env fish
wezterm start fish -c "sesh $argv" wezterm start -- fish -c "sesh $argv"

View File

@ -1,2 +1,2 @@
#!/usr/bin/sh #!/usr/bin/sh
wezterm start fish -c vban wezterm start -- fish -c vban

View File

@ -1,2 +1,2 @@
#!/usr/bin/sh #!/usr/bin/sh
wezterm start fish -c ytmpv wezterm start -- fish -c ytmpv