Update config to make stuff more functional and comfy with nvim plugs
This commit is contained in:
parent
8e565f08c9
commit
dbcf9e2208
2 changed files with 42 additions and 25 deletions
|
@ -5,7 +5,16 @@ local nvim_lsp = require('lspconfig')
|
||||||
local coq = require('coq')
|
local coq = require('coq')
|
||||||
local null_ls = require('null-ls')
|
local null_ls = require('null-ls')
|
||||||
|
|
||||||
local servers = { "html", "clangd", "vimls", "vuels", "phpactor", "rust_analyzer", "tsserver", "pyright"}
|
require('colorizer').setup()
|
||||||
|
require('feline').setup()
|
||||||
|
require('bufferline').setup{}
|
||||||
|
require('indent_blankline').setup {
|
||||||
|
-- for example, context is off by default, use this to turn it on
|
||||||
|
show_current_context = true,
|
||||||
|
show_current_context_start = true,
|
||||||
|
}
|
||||||
|
|
||||||
|
local servers = { 'html', 'clangd', 'vimls', 'vuels', 'phpactor', 'rust_analyzer', 'tsserver', 'pyright'}
|
||||||
|
|
||||||
local on_attach = function (client, bufnr)
|
local on_attach = function (client, bufnr)
|
||||||
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
|
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
|
||||||
|
|
56
.vimrc
56
.vimrc
|
@ -1,48 +1,55 @@
|
||||||
|
" Leader key
|
||||||
|
nnoremap <SPACE> <Nop>
|
||||||
|
let mapleader=' '
|
||||||
|
|
||||||
call plug#begin('~/.vim/plugged')
|
call plug#begin('~/.vim/plugged')
|
||||||
if has('nvim')
|
if has('nvim')
|
||||||
|
Plug 'lewis6991/impatient.nvim'
|
||||||
|
Plug 'glepnir/dashboard-nvim'
|
||||||
|
Plug 'nvim-lua/plenary.nvim'
|
||||||
|
Plug 'nvim-treesitter/nvim-treesitter'
|
||||||
|
Plug 'feline-nvim/feline.nvim'
|
||||||
|
Plug 'akinsho/bufferline.nvim'
|
||||||
|
Plug 'nathom/filetype.nvim'
|
||||||
Plug 'neovim/nvim-lspconfig'
|
Plug 'neovim/nvim-lspconfig'
|
||||||
Plug 'ms-jpq/coq_nvim'
|
Plug 'ms-jpq/coq_nvim'
|
||||||
Plug 'ms-jpq/coq.artifacts'
|
Plug 'ms-jpq/coq.artifacts'
|
||||||
Plug 'nvim-lua/plenary.nvim'
|
Plug 'nvim-telescope/telescope.nvim'
|
||||||
|
Plug 'windwp/nvim-autopairs'
|
||||||
|
Plug 'onsails/lspkind-nvim'
|
||||||
|
Plug 'ray-x/lsp_signature.nvim'
|
||||||
Plug 'jose-elias-alvarez/null-ls.nvim'
|
Plug 'jose-elias-alvarez/null-ls.nvim'
|
||||||
|
Plug 'nvim-telescope/telescope.nvim'
|
||||||
|
Plug 'lukas-reineke/indent-blankline.nvim'
|
||||||
|
Plug 'norcalli/nvim-colorizer.lua'
|
||||||
endif
|
endif
|
||||||
|
Plug 'andymass/vim-matchup'
|
||||||
Plug 'adelarsq/vim-matchit'
|
Plug 'adelarsq/vim-matchit'
|
||||||
Plug 'tpope/vim-surround'
|
Plug 'tpope/vim-surround'
|
||||||
Plug 'bronson/vim-trailing-whitespace'
|
|
||||||
Plug 'ms-jpq/chadtree'
|
Plug 'ms-jpq/chadtree'
|
||||||
Plug 'vim-airline/vim-airline'
|
|
||||||
Plug 'kien/ctrlp.vim'
|
|
||||||
Plug 'wincent/ferret'
|
|
||||||
Plug 'sheerun/vim-polyglot'
|
Plug 'sheerun/vim-polyglot'
|
||||||
Plug 'mattn/emmet-vim'
|
Plug 'mattn/emmet-vim'
|
||||||
Plug 'justinmk/vim-sneak'
|
Plug 'justinmk/vim-sneak'
|
||||||
Plug 'alvan/vim-closetag'
|
Plug 'alvan/vim-closetag'
|
||||||
Plug 'mipmip/vim-fluid'
|
Plug 'mipmip/vim-fluid'
|
||||||
Plug 'chrisbra/Colorizer'
|
|
||||||
Plug 'puremourning/vimspector'
|
Plug 'puremourning/vimspector'
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
if has('nvim')
|
if has('nvim')
|
||||||
set inccommand=nosplit
|
set inccommand=nosplit
|
||||||
|
|
||||||
|
"" Telescope
|
||||||
|
" Using Lua functions
|
||||||
|
nnoremap <leader>ff <cmd>lua require('telescope.builtin').find_files()<cr>
|
||||||
|
nnoremap <leader>fg <cmd>lua require('telescope.builtin').live_grep()<cr>
|
||||||
|
nnoremap <leader>fb <cmd>lua require('telescope.builtin').buffers()<cr>
|
||||||
|
nnoremap <leader>fh <cmd>lua require('telescope.builtin').help_tags()<cr>
|
||||||
endif
|
endif
|
||||||
|
|
||||||
"" NERDTree config
|
|
||||||
" Autostart NERDTree on start
|
|
||||||
" autocmd vimenter * NERDTree | wincmd w
|
|
||||||
" let NERDTreeShowHidden=1
|
|
||||||
|
|
||||||
"" CHADTree config
|
"" CHADTree config
|
||||||
autocmd VimEnter * CHADopen --nofocus
|
if !&diff
|
||||||
|
autocmd VimEnter * CHADopen --nofocus
|
||||||
" Close vim if the only window left open is a NERDTree
|
endif
|
||||||
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
|
||||||
|
|
||||||
"" CtrlP config
|
|
||||||
" Self explainatory
|
|
||||||
let g:ctrlp_max_files=0
|
|
||||||
let g:ctrlp_max_depth=40
|
|
||||||
let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git'
|
|
||||||
let g:ctrlp_show_hidden = 1
|
|
||||||
|
|
||||||
"" Vim Closetag
|
"" Vim Closetag
|
||||||
let g:closetag_filenames = '*.xml,*.xlf,*.html,*.xhtml,*.phtml'
|
let g:closetag_filenames = '*.xml,*.xlf,*.html,*.xhtml,*.phtml'
|
||||||
|
@ -71,9 +78,10 @@ set shiftwidth=4
|
||||||
set expandtab
|
set expandtab
|
||||||
set autoindent
|
set autoindent
|
||||||
|
|
||||||
let mapleader=" "
|
|
||||||
|
|
||||||
" UTF-8
|
" UTF-8
|
||||||
set encoding=utf-8
|
set encoding=utf-8
|
||||||
set fileencodings=utf-8
|
set fileencodings=utf-8
|
||||||
set fileformats=unix,dos,mac
|
set fileformats=unix,dos,mac
|
||||||
|
|
||||||
|
" Enable term color
|
||||||
|
set tgc
|
||||||
|
|
Loading…
Reference in a new issue