This commit is contained in:
Nachuan Tang
2023-12-29 19:34:35 +08:00
parent 4c07c4c6a5
commit a311601aea
7 changed files with 31 additions and 34 deletions
+7
View File
@@ -16,6 +16,13 @@
let g:isWSL = 0 let g:isWSL = 0
if has("win64") || has("win32") || has("win16") if has("win64") || has("win32") || has("win16")
let g:os = "Windows" let g:os = "Windows"
set updatetime=50
if executable('pwsh')
" prefer to use powershell 7
set shell=pwsh
else
set shell=powershell
endif
else else
let g:os = substitute(system('uname'), '\n', '', '') let g:os = substitute(system('uname'), '\n', '', '')
if system('uname -r') =~ "icrosoft" if system('uname -r') =~ "icrosoft"
-6
View File
@@ -6,9 +6,3 @@ func! os#getOS()
endif endif
endfunc endfunc
function! os#setWindows()
set updatetime=50
set shell=powershell
endfunction
@@ -17,19 +17,7 @@ if HasPlug('telescope.nvim') then
return layout return layout
end end
telescope.setup { telescope.setup {
defaults = {
hidden = true,
vimgrep_arguments = vimgrep_arguments,
file_ignore_patterns = {"node_modules/", ".git/"},
layout_config = {
-- prompt_position = "top",
},
layout_strategy = "horizontal_merged",
},
pickers = { pickers = {
find_files = {
hidden = true,
},
colorscheme = { colorscheme = {
enable_preview = true, enable_preview = true,
mappings = { mappings = {
@@ -44,6 +32,15 @@ if HasPlug('telescope.nvim') then
}, },
} }
}, },
defaults = {
hidden = true,
vimgrep_arguments = vimgrep_arguments,
file_ignore_patterns = {"^node_modules/", "^.git/"},
layout_config = {
-- prompt_position = "top",
},
layout_strategy = "horizontal_merged",
},
extensions = { extensions = {
fzf = { fzf = {
fuzzy = true, -- false will only do exact matching fuzzy = true, -- false will only do exact matching
@@ -62,4 +62,18 @@ if HasPlug('toggleterm.nvim') then
vim.api.nvim_set_keymap("x", "<leader>tl", string.format(":ToggleTermSendVisualSelection %d<CR>", ipythonId), vim.api.nvim_set_keymap("x", "<leader>tl", string.format(":ToggleTermSendVisualSelection %d<CR>", ipythonId),
{ noremap = true, silent = true }) { noremap = true, silent = true })
print(vim.o.shell)
if vim.o.shell == 'pwsh' or vim.o.shell == 'powershell' then
local powershell_options = {
shellcmdflag = "-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;",
shellredir = "-RedirectStandardOutput %s -NoNewWindow -Wait",
shellpipe = "2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode",
shellquote = "",
shellxquote = "",
}
for option, value in pairs(powershell_options) do
vim.opt[option] = value
end
end
end end
@@ -1,9 +0,0 @@
if HasPlug('vim-illuminate') then
require'nvim-treesitter.configs'.setup {
matchup = {
enable = true,
disable = { },
},
}
end
-4
View File
@@ -6,8 +6,4 @@ let g:loaded_vim_config = 1
let os = os#getOS() let os = os#getOS()
if os == 'Windows'
call os#setWindows()
endif
call options#init() call options#init()
+1 -3
View File
@@ -7,7 +7,7 @@
" KEY_MAPS " KEY_MAPS
" OTHER_CONFIGS " OTHER_CONFIGS
let g:high_performence = v:true let g:high_performence = v:false
let g:autocomplte_enable = v:true let g:autocomplte_enable = v:true
let g:copilot_enable = v:true let g:copilot_enable = v:true
@@ -45,14 +45,12 @@ call plug#begin(g:plugin_dir)
Plug 'tek256/simple-dark' Plug 'tek256/simple-dark'
Plug 'sainnhe/everforest' Plug 'sainnhe/everforest'
Plug 'bluz71/vim-moonfly-colors', { 'as': 'moonfly' } Plug 'bluz71/vim-moonfly-colors', { 'as': 'moonfly' }
" Plug 'jacoborus/tender.vim'
Plug 'cocopon/iceberg.vim' Plug 'cocopon/iceberg.vim'
Plug 'catppuccin/nvim', Cond( has('nvim-0.8.2') \|\| g:vim_v >= 900 , { 'as': 'catppuccin' }) Plug 'catppuccin/nvim', Cond( has('nvim-0.8.2') \|\| g:vim_v >= 900 , { 'as': 'catppuccin' })
Plug 'NLKNguyen/papercolor-theme' Plug 'NLKNguyen/papercolor-theme'
Plug 'EdenEast/nightfox.nvim', Cond(has('nvim-0.5')) Plug 'EdenEast/nightfox.nvim', Cond(has('nvim-0.5'))
Plug 'projekt0n/github-nvim-theme', Cond(has('nvim-0.5'), { 'tag': 'v0.0.7' }) Plug 'projekt0n/github-nvim-theme', Cond(has('nvim-0.5'), { 'tag': 'v0.0.7' })
Plug 'folke/tokyonight.nvim', Cond(g:vim_type == 'nvim', { 'branch': 'main' }) Plug 'folke/tokyonight.nvim', Cond(g:vim_type == 'nvim', { 'branch': 'main' })
" Plug 'junegunn/goyo.vim', { 'on': ['Goyo'] }
Plug 'andymass/vim-matchup' Plug 'andymass/vim-matchup'
endif endif
Plug 'Donaldttt/fuzzyy' Plug 'Donaldttt/fuzzyy'