From 4859336ea0b05d5cb54ebadcb80d1b6982c96b0c Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Tue, 6 Jun 2023 06:45:25 -0600 Subject: fine tune settings, lualine now looks like power/air line --- lua/plugins/autocompletion.lua | 37 ++++++++++++++++++++++--------------- lua/plugins/lualine.lua | 6 +++--- 2 files changed, 25 insertions(+), 18 deletions(-) (limited to 'lua') diff --git a/lua/plugins/autocompletion.lua b/lua/plugins/autocompletion.lua index 1ba7ead..0da6e16 100644 --- a/lua/plugins/autocompletion.lua +++ b/lua/plugins/autocompletion.lua @@ -1,36 +1,40 @@ return { 'hrsh7th/nvim-cmp', dependencies = { + 'neovim/nvim-lspconfig', + 'hrsh7th/cmp-nvim-lsp', + 'hrsh7th/cmp-buffer', + 'hrsh7th/cmp-path', + 'hrsh7th/cmp-cmdline', + 'hrsh7th/cmp-nvim-lua', -- Snippet Engine & its associated nvim-cmp source - { 'L3MON4D3/LuaSnip', opts = {} }, + { 'L3MON4D3/LuaSnip', + dependencies = 'rafamadriz/friendly-snippets', + }, 'saadparwaiz1/cmp_luasnip', - -- Adds LSP completion capabilities - 'hrsh7th/cmp-nvim-lsp', - -- Adds a number of user-friendly snippets - 'rafamadriz/friendly-snippets', }, config = function() local cmp = require('cmp') local luasnip = require('luasnip') require('luasnip.loaders.from_vscode').lazy_load() - -- luasnip.config.setup {} + luasnip.config.setup({}) - cmp.setup { + cmp.setup({ snippet = { expand = function(args) luasnip.lsp_expand(args.body) end, }, - mapping = cmp.mapping.preset.insert { + mapping = cmp.mapping.preset.insert({ [''] = cmp.mapping.select_next_item(), [''] = cmp.mapping.select_prev_item(), [''] = cmp.mapping.scroll_docs(-4), [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete {}, - [''] = cmp.mapping.confirm { + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true, - }, + }), [''] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() @@ -49,11 +53,14 @@ return { fallback() end end, { 'i', 's' }), - }, - sources = { + }), + sources = cmp.config.sources({ { name = 'nvim_lsp' }, { name = 'luasnip' }, - }, - } + { name = 'nvim_lua' }, + { name = 'path' }, + { name = 'buffer' }, + }), + }) end, } diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index a90a94c..be54a4f 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -2,10 +2,10 @@ return { 'nvim-lualine/lualine.nvim', opts = { options = { - icons_enabled = false, + icons_enabled = true, theme = 'dracula-nvim', - component_separators = '|', - section_separators = '', + -- component_separators = '|', + -- section_separators = '', }, }, } -- cgit v1.2.3-54-g00ecf