Added vim-table-mode and fixed formatting

main
zoomiti 4 years ago
parent cdb1a37687
commit bb13895c3a

@ -11,12 +11,15 @@ Plug 'ap/vim-css-color'
"Surround "Surround
Plug 'tpope/vim-surround' Plug 'tpope/vim-surround'
"Latex
Plug 'lervag/vimtex'
" For snippets " For snippets
Plug 'SirVer/ultisnips' Plug 'SirVer/ultisnips'
" Latex
Plug 'lervag/vimtex'
" Table mode
Plug 'dhruvasagar/vim-table-mode'
if has("nvim") if has("nvim")
" LSP " LSP
Plug 'neovim/nvim-lspconfig' Plug 'neovim/nvim-lspconfig'
@ -59,7 +62,7 @@ inoremap <expr> <tab> InsertTabWrapper()
inoremap <s-tab> <c-n> inoremap <s-tab> <c-n>
" Make " Make
set makeprg=make\ --silent\ 2>&1\ \\\|\ grep\ -E\ \"^([^:\\S]+):\\S+:.+\" " set makeprg=make\ --silent\ 2>&1\ \\\|\ grep\ -E\ \"^([^:\\S]+):\\S+:.+\"
syntax on syntax on
@ -90,10 +93,10 @@ set shiftwidth=4
set showmatch " Show matching brackets. set showmatch " Show matching brackets.
"set ignorecase " Do case insensitive matching "set ignorecase " Do case insensitive matching
set smartcase " Do smart case matching set smartcase " Do smart case matching
"set incsearch " Incremental search set incsearch " Incremental search
set autowrite " Automatically save before commands like :next and :make set autowrite " Automatically save before commands like :next and :make
"set hidden " Hide buffers when they are abandoned set hidden " Hide buffers when they are abandoned
"set mouse=a " Enable mouse usage (all modes) set mouse=a " Enable mouse usage (all modes)
set number " Enable line numbers set number " Enable line numbers
set relativenumber " Enable relative line numbers set relativenumber " Enable relative line numbers
@ -119,7 +122,7 @@ if has("nvim")
tnoremap <C-W><down> <C-\><C-N><C-W><down> tnoremap <C-W><down> <C-\><C-N><C-W><down>
tnoremap <C-W><up> <C-\><C-N><C-W><up> tnoremap <C-W><up> <C-\><C-N><C-W><up>
tnoremap <C-W><right> <C-\><C-N><C-W><right> tnoremap <C-W><right> <C-\><C-N><C-W><right>
end endif
" Source a global configuration file if available " Source a global configuration file if available
if filereadable("/etc/vim/vimrc.local") if filereadable("/etc/vim/vimrc.local")
@ -128,7 +131,7 @@ endif
" LSP Setup " LSP Setup
if has("nvim") if has("nvim")
lua <<EOF lua << EOF
-- Setup nvim-cmp. -- Setup nvim-cmp.
local cmp = require'cmp' local cmp = require'cmp'
@ -172,21 +175,27 @@ lua <<EOF
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
end end
require('lean').setup{ require('lean').setup{
-- Enable the Lean language server(s)? -- Enable the Lean language server(s)?
-- --
-- false to disable, otherwise should be a table of options to pass to -- false to disable, otherwise should be a table of options to pass to
-- `leanls` and/or `lean3ls`. -- `leanls` and/or `lean3ls`.
-- --
-- See https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#leanls for details. -- See https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#leanls for details.
-- Lean 4 -- Lean 4
lsp = { on_attach = on_attach }, lsp = { on_attach = on_attach },
-- Lean 3 -- Lean 3
lsp3 = { on_attach = on_attach }, lsp3 = { on_attach = on_attach },
-- Abbreviation support -- What filetype should be associated with standalone Lean files?
abbreviations = { -- Can be set to "lean3" if you prefer that default.
-- Having a leanpkg.toml or lean-toolchain file should always mean
-- autodetection works correctly.
ft = { default = "lean3" },
-- Abbreviation support
abbreviations = {
-- Set one of the following to true to enable abbreviations -- Set one of the following to true to enable abbreviations
builtin = true, -- built-in expander builtin = true, -- built-in expander
compe = false, -- nvim-compe source compe = false, -- nvim-compe source
@ -203,28 +212,28 @@ lua <<EOF
-- Change if you don't like the backslash -- Change if you don't like the backslash
-- (comma is a popular choice on French keyboards) -- (comma is a popular choice on French keyboards)
leader = '\\', leader = '\\',
}, },
-- Enable suggested mappings? -- Enable suggested mappings?
-- --
-- false by default, true to enable -- false by default, true to enable
mappings = true, mappings = true,
-- Infoview support -- Infoview support
infoview = { infoview = {
-- Automatically open an infoview on entering a Lean buffer? -- Automatically open an infoview on entering a Lean buffer?
autoopen = true, autoopen = true,
-- Set the infoview windows' widths -- Set the infoview windows' widths
width = 30, width = 30,
}, },
-- Progress bar support -- Progress bar support
progress_bars = { progress_bars = {
-- Enable the progress bars? -- Enable the progress bars?
enable = true, enable = true,
-- Use a different priority for the signs -- Use a different priority for the signs
priority = 10, priority = 10,
}, },
} }
EOF EOF
end endif

Loading…