From ef5577e7fe0c5a0985563c0734c0bebfa23023f0 Mon Sep 17 00:00:00 2001 From: qwjyh Date: Sun, 12 Mar 2023 20:08:58 +0900 Subject: [PATCH] update: nvim: auto comp --- dotfiles/neovim/init.lua | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/dotfiles/neovim/init.lua b/dotfiles/neovim/init.lua index 7cb9c24..a3a9d1b 100644 --- a/dotfiles/neovim/init.lua +++ b/dotfiles/neovim/init.lua @@ -28,7 +28,13 @@ require('lazy').setup({ 'neovim/nvim-lspconfig', { 'hrsh7th/nvim-cmp', - dependencies = { 'hrsh7th/cmp-nvim-lsp', 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip' }, + event = "InsertEnter", + dependencies = { + 'hrsh7th/cmp-nvim-lsp', -- LSP + 'L3MON4D3/LuaSnip', -- snippets + 'saadparwaiz1/cmp_luasnip', + 'kdheepak/cmp-latex-symbols', -- latex math + }, }, }) @@ -74,6 +80,9 @@ if vim.fn.has('win32') == 1 then vim.opt.shellxquote = '' end +----------------------------------------------------------- +-- lualine +require('lualine_setup') ----------------------------------------------------------- -- LSP config @@ -188,6 +197,12 @@ cmp.setup { sources = { { name = 'nvim_lsp' }, { name = 'luasnip' }, + { + name = 'latex_symbols', + option = { + strategy = 0, -- mixed (show the comand and insert the symbol) + }, + }, }, } @@ -199,7 +214,4 @@ vim.api.nvim_set_keymap('n', '', { noremap = true, silent = true }) ------------------------------------------------------------ --- lualine -require('lualine_setup')