From 6266298b92ad61ed39ab03f2098abc7b4222ad52 Mon Sep 17 00:00:00 2001 From: Ivan Polyakov Date: Fri, 17 Jun 2022 20:19:50 +0300 Subject: [PATCH] lualine, lsp and snippets --- .config/nvim/init.vim | 39 ++++++++++++++++++++++++++++++++++++ .config/nvim/lua/plugins.lua | 18 +++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index cf8a373..2f2806a 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -35,6 +35,14 @@ inoremap u[s1z=`]au """ Plugins lua require('plugins') +lua require('lualine').setup{} + +"" Snippets +imap snippy#can_expand_or_advance() ? '(snippy-expand-or-advance)' : '' +imap snippy#can_jump(-1) ? '(snippy-previous)' : '' +smap snippy#can_jump(1) ? '(snippy-next)' : '' +smap snippy#can_jump(-1) ? '(snippy-previous)' : '' +xmap (snippy-cut-text) "" LaTeX let g:tex_flavor='latex' @@ -54,3 +62,34 @@ let g:vimtex_syntax_conceal = { \ 'styles': 1, \} 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 diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index e853017..f3bda22 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -3,11 +3,29 @@ return require('packer').startup(function() use 'shaunsingh/nord.nvim' + use { + 'nvim-lualine/lualine.nvim', + requires = { 'kyazdani42/nvim-web-devicons', opt = true } + } + use 'preservim/nerdtree' + use 'dcampos/nvim-snippy' + + use 'honza/vim-snippets' + use { 'lervag/vimtex', tag = 'v2.9', ft = 'tex' } + + use { + 'digitaltoad/vim-pug', + ft = {'pug', 'vue'} + } + + use 'neovim/nvim-lspconfig' + + use 'MunifTanjim/nui.nvim' end)