Browse Source

lualine, lsp and snippets

master
Ivan Polyakov 2 years ago
parent
commit
6266298b92
  1. 39
      .config/nvim/init.vim
  2. 18
      .config/nvim/lua/plugins.lua

39
.config/nvim/init.vim

@ -35,6 +35,14 @@ inoremap <C-l> <c-g>u<Esc>[s1z=`]a<c-g>u
""" Plugins """ Plugins
lua require('plugins') lua require('plugins')
lua require('lualine').setup{}
"" Snippets
imap <expr> <Tab> snippy#can_expand_or_advance() ? '<Plug>(snippy-expand-or-advance)' : '<Tab>'
imap <expr> <S-Tab> snippy#can_jump(-1) ? '<Plug>(snippy-previous)' : '<S-Tab>'
smap <expr> <Tab> snippy#can_jump(1) ? '<Plug>(snippy-next)' : '<Tab>'
smap <expr> <S-Tab> snippy#can_jump(-1) ? '<Plug>(snippy-previous)' : '<S-Tab>'
xmap <Tab> <Plug>(snippy-cut-text)
"" LaTeX "" LaTeX
let g:tex_flavor='latex' let g:tex_flavor='latex'
@ -54,3 +62,34 @@ let g:vimtex_syntax_conceal = {
\ 'styles': 1, \ 'styles': 1,
\} \}
set conceallevel=2 set conceallevel=2
"" LSP
"" See: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
lua << EOF
local lsp = require('lspconfig')
lsp.clangd.setup {
filetypes = { "c", "cpp", "cxx" }
}
lsp.eslint.setup{}
lsp.sumneko_lua.setup {
settings = {
Lua = {
runtime = {
version = 'LuaJIT',
},
diagnostics = {
globals = {'vim'},
},
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
},
telemetry = {
enable = false,
},
},
},
}
EOF

18
.config/nvim/lua/plugins.lua

@ -3,11 +3,29 @@ return require('packer').startup(function()
use 'shaunsingh/nord.nvim' use 'shaunsingh/nord.nvim'
use {
'nvim-lualine/lualine.nvim',
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
}
use 'preservim/nerdtree' use 'preservim/nerdtree'
use 'dcampos/nvim-snippy'
use 'honza/vim-snippets'
use { use {
'lervag/vimtex', 'lervag/vimtex',
tag = 'v2.9', tag = 'v2.9',
ft = 'tex' ft = 'tex'
} }
use {
'digitaltoad/vim-pug',
ft = {'pug', 'vue'}
}
use 'neovim/nvim-lspconfig'
use 'MunifTanjim/nui.nvim'
end) end)

Loading…
Cancel
Save