update
This commit is contained in:
parent
28d7111aee
commit
4f595cae5b
@ -76,4 +76,12 @@ install_nodejs() {
|
||||
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_require_dep
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
XIM=fcitx
|
||||
|
||||
GTK_IM_MODULE=fcitx
|
||||
QT_IM_MODULE=fcitx
|
||||
@ -6,8 +7,10 @@ GLFW_IM_MODULE=fcitx
|
||||
SDL_IM_MODULE=fcitx
|
||||
MOZ_ENABLE_WAYLAND=1
|
||||
RTC_USE_PIPEWIRE=true
|
||||
IM_MODULE_CLASSNAME=fcitx::QFcitxPlatformInputContext
|
||||
|
||||
GDK_BACKEND=wayland,x11
|
||||
QT_QPA_PLATFORM="wayland;xcb"
|
||||
CLUTTER_BACKEND=wayland
|
||||
SDL_VIDEODRIVER=wayland
|
||||
EDITOR=nvim
|
||||
|
||||
@ -6,7 +6,12 @@ local scopes = {o = vim.o, b = vim.bo, w = vim.wo}
|
||||
|
||||
|
||||
cmd "syntax on"
|
||||
cmd "set number"
|
||||
-- 相對行號顯示
|
||||
-- cmd "set relativenumber"
|
||||
-- 絕對行號顯示
|
||||
-- cmd "set number"
|
||||
-- 混合模式,同時顯示相對行號和絕對行號
|
||||
cmd "set number relativenumber"
|
||||
cmd "set tabstop=2"
|
||||
cmd "set shiftwidth=2"
|
||||
cmd "set expandtab"
|
||||
|
||||
@ -12,9 +12,14 @@ return {
|
||||
|
||||
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_command = "goimports"
|
||||
g.go_def_mode = 'gopls'
|
||||
g.go_def_mode = ''
|
||||
g.go_info_mode = ''
|
||||
g.go_decls_includes = "func,type"
|
||||
g.go_highlight_types = 1
|
||||
g.go_highlight_fields = 1
|
||||
|
||||
@ -145,5 +145,6 @@ return {
|
||||
},
|
||||
require('plugins.vim-ai'),
|
||||
-- ai 助手
|
||||
require('plugins.avante'),
|
||||
-- require('plugins.avante'),
|
||||
require('plugins.codecompanion'),
|
||||
}
|
||||
|
||||
@ -42,40 +42,48 @@ return {
|
||||
buf_set_keymap('n', '<leader>gf', '<cmd>lua vim.lsp.buf.format()<CR>', opts)
|
||||
end
|
||||
|
||||
local nvlsp = require('lspconfig')
|
||||
|
||||
nvlsp['gopls'].setup{
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
}
|
||||
nvlsp['ts_ls'].setup{
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
}
|
||||
nvlsp['rust_analyzer'].setup{
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
}
|
||||
nvlsp['bashls'].setup{
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
}
|
||||
nvlsp['svelte'].setup{
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
}
|
||||
nvlsp['pylsp'].setup{
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
}
|
||||
nvlsp['zls'].setup{
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
}
|
||||
nvlsp['lua_ls'].setup{
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
}
|
||||
vim.lsp.config('gopls', {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
vim.lsp.config('ts_ls', {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
vim.lsp.config('rust_analyzer', {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
vim.lsp.config('bashls', {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
vim.lsp.config('svelte', {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
vim.lsp.config('pylsp', {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
vim.lsp.config('zls', {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
vim.lsp.config('lua_ls', {
|
||||
capabilities = capabilities,
|
||||
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
|
||||
}
|
||||
|
||||
@ -153,7 +153,7 @@ multiline_continuation_char = ''
|
||||
null_string = '<null>'
|
||||
|
||||
# manage pager on startup
|
||||
enable_pager = True
|
||||
enable_pager = False
|
||||
|
||||
# Use keyring to automatically save and load password in a secure manner
|
||||
keyring = True
|
||||
|
||||
@ -14,3 +14,5 @@ CLUTTER_BACKEND=wayland
|
||||
SDL_VIDEODRIVER=wayland
|
||||
|
||||
EDITOR=nvim
|
||||
|
||||
WINEPREFIX=/home/jay/.wine
|
||||
|
||||
@ -142,9 +142,23 @@ if-shell -b '[ "$TMUX_VERSION_29" = 0 ]' \
|
||||
if-shell -b '[ "$TMUX_VERSION_29" = 1 ]' \
|
||||
"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
|
||||
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
|
||||
|
||||
# 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
|
||||
#-----------------------------
|
||||
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)
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user