dump before switch to lazy
This commit is contained in:
parent
69cfc8eae3
commit
b12c7ea937
35
init.vim
35
init.vim
|
@ -20,17 +20,24 @@ set expandtab
|
|||
set autoindent
|
||||
set smartindent
|
||||
|
||||
|
||||
let mapleader="\<Space>"
|
||||
let maplocalleader="\<Space>"
|
||||
|
||||
|
||||
" set statusline=%n\ %<%f\ %LL\ %{&modified?'[+]':&modifiable\|\|&ft=~'^\\vhelp\|qf$'?'':'[-]'}%h%r%{&fenc=='utf-8'\|\|&fenc==''?'':'['.&fenc.']'}%{'['.&ff.']'}%{&bomb?'[BOM]':''}%{&eol?'':'[noeol]'}%{&diff?'[diff]':''}%=\ 0x%-4.8B\ \ \ \ %-14.(%l,%c%V%)\ %p%%
|
||||
|
||||
|
||||
" plugin 'toogleterm' need this or it will initialze a new terminal each time foucus on terminal
|
||||
set hidden
|
||||
|
||||
nmap <C-q> <C-w>q
|
||||
|
||||
nmap <C-h> <C-w>h
|
||||
nmap <C-j> <C-w>j
|
||||
nmap <C-k> <C-w>k
|
||||
nmap <C-l> <C-w>l
|
||||
|
||||
lua << EOF
|
||||
vim.g.markdown_fenced_languages = {
|
||||
"ts=typescript"
|
||||
}
|
||||
EOF
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" config of vim-plug
|
||||
|
@ -50,17 +57,26 @@ function! s:plug_setup(dict)
|
|||
return get(a:dict, 'setup')
|
||||
endfunction
|
||||
|
||||
" call add_plug('kyazdani42/nvim-web-devicons', v:false)
|
||||
" call add_plug('bling/vim-bufferline', v:false)
|
||||
|
||||
call s:add_plug('neovim/nvim-lspconfig')
|
||||
call s:add_plug('kyazdani42/nvim-tree.lua')
|
||||
call s:add_plug('nvim-lualine/lualine.nvim')
|
||||
call s:add_plug('kyazdani42/nvim-web-devicons', v:false)
|
||||
call s:add_plug('akinsho/toggleterm.nvim')
|
||||
call s:add_plug('lukas-reineke/indent-blankline.nvim')
|
||||
call s:add_plug('ap/vim-buftabline')
|
||||
call s:add_plug('jupyter-vim/jupyter-vim')
|
||||
call s:add_plug('projekt0n/github-nvim-theme')
|
||||
|
||||
"call s:add_plug('nvim-lualine/lualine.nvim')
|
||||
"call s:add_plug('ap/vim-buftabline')
|
||||
"call s:add_plug('projekt0n/github-nvim-theme')
|
||||
|
||||
call s:add_plug('morhetz/gruvbox', v:false)
|
||||
call s:add_plug('vim-airline/vim-airline', v:false)
|
||||
call s:add_plug('vim-airline/vim-airline-themes', v:false)
|
||||
call s:add_plug('bling/vim-bufferline', v:false)
|
||||
|
||||
let g:airline_theme='violet'
|
||||
set background=dark
|
||||
|
||||
|
||||
function! s:setup_file(plug_name)
|
||||
|
@ -75,7 +91,6 @@ endfunction
|
|||
|
||||
call plug#begin(has('nvim') ? stdpath('data') .. '/plugged' : '~/.vim/plugged')
|
||||
for p in s:plugs
|
||||
" Plug s:plug_name(p)
|
||||
Plug get(p, 'name')
|
||||
endfor
|
||||
call plug#end()
|
||||
|
|
|
@ -42,7 +42,7 @@ end
|
|||
|
||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||
-- map buffer local keybindings when the language server attaches
|
||||
local servers = { 'pyright', 'html' }
|
||||
local servers = { 'pyright', 'html', 'gopls' }
|
||||
for _, lsp in ipairs(servers) do
|
||||
nvim_lsp[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
|
@ -53,4 +53,7 @@ for _, lsp in ipairs(servers) do
|
|||
}
|
||||
end
|
||||
|
||||
require'lspconfig'.quick_lint_js.setup{}
|
||||
require'lspconfig'.denols.setup{}
|
||||
|
||||
EOF
|
||||
|
|
|
@ -4,39 +4,10 @@
|
|||
|
||||
lua << EOF
|
||||
require("toggleterm").setup{
|
||||
-- size can be a number or function which is passed the current terminal
|
||||
size = function(term)
|
||||
if term.direction == "horizontal" then
|
||||
return 15
|
||||
elseif term.direction == "vertical" then
|
||||
return vim.o.columns * 0.4
|
||||
end
|
||||
end,
|
||||
open_mapping = [[<c-\>]],
|
||||
hide_numbers = true, -- hide the number column in toggleterm buffers
|
||||
shade_filetypes = {},
|
||||
shade_terminals = true,
|
||||
shading_factor = '<number>', -- the degree by which to darken to terminal colour, default: 1 for dark backgrounds, 3 for light
|
||||
start_in_insert = true,
|
||||
insert_mappings = true, -- whether or not the open mapping applies in insert mode
|
||||
persist_size = true,
|
||||
direction = 'vertical', -- | 'horizontal' | 'window' | 'float',
|
||||
close_on_exit = true, -- close the terminal window when the process exits
|
||||
shell = vim.o.shell, -- change the default shell
|
||||
-- This field is only relevant if direction is set to 'float'
|
||||
float_opts = {
|
||||
-- The border key is *almost* the same as 'nvim_open_win'
|
||||
-- see :h nvim_open_win for details on borders however
|
||||
-- the 'curved' border is a custom border type
|
||||
-- not natively supported but implemented in this plugin.
|
||||
border = 'single', -- | 'double' | 'shadow' | 'curved' -- | ... other options supported by win open
|
||||
width = 100,
|
||||
height = 40,
|
||||
winblend = 3,
|
||||
highlights = {
|
||||
border = "Normal",
|
||||
background = "Normal",
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
nnoremap <C-\> <Cmd>ToggleTerm<CR>
|
||||
" tnoremap <C-\> <Cmd>ToggleTerm<CR>
|
||||
tnoremap <C-\> <Cmd>wincmd p<CR>
|
||||
tnoremap <leader><Esc> <C-\><c-n>
|
||||
|
|
Loading…
Reference in a new issue