This commit is contained in:
jay 2025-11-04 23:07:08 +08:00
parent 28d7111aee
commit 4f595cae5b
9 changed files with 85 additions and 38 deletions

View File

@ -76,4 +76,12 @@ install_nodejs() {
return 0 return 0
} }
install_require_dep() {
PATH="$HOME/apps/go/bin:$HOME/apps/node/bin:$PATH"
if command -v npm > /dev/null; then
npm i -g typescript typescript-language-server dockerfile-language-server-nodejs svelte-language-server
fi
}
install_nodejs "$1" install_nodejs "$1"
install_require_dep

View File

@ -1,3 +1,4 @@
XIM=fcitx
GTK_IM_MODULE=fcitx GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx QT_IM_MODULE=fcitx
@ -6,8 +7,10 @@ GLFW_IM_MODULE=fcitx
SDL_IM_MODULE=fcitx SDL_IM_MODULE=fcitx
MOZ_ENABLE_WAYLAND=1 MOZ_ENABLE_WAYLAND=1
RTC_USE_PIPEWIRE=true RTC_USE_PIPEWIRE=true
IM_MODULE_CLASSNAME=fcitx::QFcitxPlatformInputContext
GDK_BACKEND=wayland,x11 GDK_BACKEND=wayland,x11
QT_QPA_PLATFORM="wayland;xcb" QT_QPA_PLATFORM="wayland;xcb"
CLUTTER_BACKEND=wayland CLUTTER_BACKEND=wayland
SDL_VIDEODRIVER=wayland SDL_VIDEODRIVER=wayland
EDITOR=nvim

View File

@ -6,7 +6,12 @@ local scopes = {o = vim.o, b = vim.bo, w = vim.wo}
cmd "syntax on" cmd "syntax on"
cmd "set number" -- 相對行號顯示
-- cmd "set relativenumber"
-- 絕對行號顯示
-- cmd "set number"
-- 混合模式,同時顯示相對行號和絕對行號
cmd "set number relativenumber"
cmd "set tabstop=2" cmd "set tabstop=2"
cmd "set shiftwidth=2" cmd "set shiftwidth=2"
cmd "set expandtab" cmd "set expandtab"

View File

@ -12,9 +12,14 @@ return {
local g = vim.g local g = vim.g
g.go_gopls_enabled = 0
g.go_def_mapping_enabled = 0
g.go_code_completion_enabled = 0
g.go_doc_keywordprg_enabled = 0
g.go_fmt_fail_silently = 1 g.go_fmt_fail_silently = 1
g.go_fmt_command = "goimports" g.go_fmt_command = "goimports"
g.go_def_mode = 'gopls' g.go_def_mode = ''
g.go_info_mode = ''
g.go_decls_includes = "func,type" g.go_decls_includes = "func,type"
g.go_highlight_types = 1 g.go_highlight_types = 1
g.go_highlight_fields = 1 g.go_highlight_fields = 1

View File

@ -145,5 +145,6 @@ return {
}, },
require('plugins.vim-ai'), require('plugins.vim-ai'),
-- ai 助手 -- ai 助手
require('plugins.avante'), -- require('plugins.avante'),
require('plugins.codecompanion'),
} }

View File

@ -42,40 +42,48 @@ return {
buf_set_keymap('n', '<leader>gf', '<cmd>lua vim.lsp.buf.format()<CR>', opts) buf_set_keymap('n', '<leader>gf', '<cmd>lua vim.lsp.buf.format()<CR>', opts)
end end
local nvlsp = require('lspconfig')
nvlsp['gopls'].setup{ vim.lsp.config('gopls', {
capabilities = capabilities, capabilities = capabilities,
on_attach = on_attach, on_attach = on_attach,
} })
nvlsp['ts_ls'].setup{ vim.lsp.config('ts_ls', {
capabilities = capabilities, capabilities = capabilities,
on_attach = on_attach, on_attach = on_attach,
} })
nvlsp['rust_analyzer'].setup{ vim.lsp.config('rust_analyzer', {
capabilities = capabilities, capabilities = capabilities,
on_attach = on_attach, on_attach = on_attach,
} })
nvlsp['bashls'].setup{ vim.lsp.config('bashls', {
capabilities = capabilities, capabilities = capabilities,
on_attach = on_attach, on_attach = on_attach,
} })
nvlsp['svelte'].setup{ vim.lsp.config('svelte', {
capabilities = capabilities, capabilities = capabilities,
on_attach = on_attach, on_attach = on_attach,
} })
nvlsp['pylsp'].setup{ vim.lsp.config('pylsp', {
capabilities = capabilities, capabilities = capabilities,
on_attach = on_attach, on_attach = on_attach,
} })
nvlsp['zls'].setup{ vim.lsp.config('zls', {
capabilities = capabilities, capabilities = capabilities,
on_attach = on_attach, on_attach = on_attach,
} })
nvlsp['lua_ls'].setup{ vim.lsp.config('lua_ls', {
capabilities = capabilities, capabilities = capabilities,
on_attach = on_attach, on_attach = on_attach,
} })
vim.lsp.enable('gopls')
vim.lsp.enable('ts_ls')
vim.lsp.enable('rust_analyzer')
vim.lsp.enable('bashls')
vim.lsp.enable('svelte')
vim.lsp.enable('pylsp')
vim.lsp.enable('zls')
vim.lsp.enable('lua_ls')
end end
} }

View File

@ -153,7 +153,7 @@ multiline_continuation_char = ''
null_string = '<null>' null_string = '<null>'
# manage pager on startup # manage pager on startup
enable_pager = True enable_pager = False
# Use keyring to automatically save and load password in a secure manner # Use keyring to automatically save and load password in a secure manner
keyring = True keyring = True

View File

@ -14,3 +14,5 @@ CLUTTER_BACKEND=wayland
SDL_VIDEODRIVER=wayland SDL_VIDEODRIVER=wayland
EDITOR=nvim EDITOR=nvim
WINEPREFIX=/home/jay/.wine

View File

@ -142,9 +142,23 @@ if-shell -b '[ "$TMUX_VERSION_29" = 0 ]' \
if-shell -b '[ "$TMUX_VERSION_29" = 1 ]' \ if-shell -b '[ "$TMUX_VERSION_29" = 1 ]' \
"set -g message-style fg=white,bg=black,bright" "set -g message-style fg=white,bg=black,bright"
set -g @batt_icon_charge_tier8 '🌕'
set -g @batt_icon_charge_tier7 '🌖'
set -g @batt_icon_charge_tier6 '🌖'
set -g @batt_icon_charge_tier5 '🌗'
set -g @batt_icon_charge_tier4 '🌗'
set -g @batt_icon_charge_tier3 '🌘'
set -g @batt_icon_charge_tier2 '🌘'
set -g @batt_icon_charge_tier1 '🌑'
set -g @batt_icon_status_charged '🔋'
set -g @batt_icon_status_charging '⚡'
set -g @batt_icon_status_discharging '👎'
set -g @batt_color_status_primary_charged '#3daee9'
set -g @batt_color_status_primary_charging '#3daee9'
# what to be displayed on the right status # what to be displayed on the right status
set -g status-interval 1 set -g status-interval 1
set -g status-right ' } %Y-%m-%d %H:%M:%S' set -g status-right ' } Batt: #{battery_icon} #{battery_percentage} | Temp: #( ~/bin/tmux-right.sh ) | %Y-%m-%d %H:%M:%S'
set -g status-right-length 60 set -g status-right-length 60
# what to be displayed on the left status # what to be displayed on the left status
@ -161,6 +175,7 @@ if-shell "hash reattach-to-user-namespace 2> /dev/null" 'set-option -g default-c
# Plugins # Plugins
#----------------------------- #-----------------------------
set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-battery'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm' run '~/.tmux/plugins/tpm/tpm'