diff --git a/init.vim b/init.vim index 078225e..6e0665e 100644 --- a/init.vim +++ b/init.vim @@ -20,17 +20,24 @@ set expandtab set autoindent set smartindent - let mapleader="\" let maplocalleader="\" - -" 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 q + +nmap h +nmap j +nmap k +nmap 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() diff --git a/plugins.d/nvim-lspconfig.vim b/plugins.d/nvim-lspconfig.vim index 05d67c4..3068f2c 100644 --- a/plugins.d/nvim-lspconfig.vim +++ b/plugins.d/nvim-lspconfig.vim @@ -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 diff --git a/plugins.d/toggleterm.vim b/plugins.d/toggleterm.vim index da9d05d..aab00c0 100644 --- a/plugins.d/toggleterm.vim +++ b/plugins.d/toggleterm.vim @@ -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 = [[]], - hide_numbers = true, -- hide the number column in toggleterm buffers - shade_filetypes = {}, - shade_terminals = true, - shading_factor = '', -- 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 ToggleTerm +" tnoremap ToggleTerm +tnoremap wincmd p +tnoremap