summaryrefslogtreecommitdiff
path: root/lua/plugins
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <david@luevano.xyz>2023-06-06 06:45:25 -0600
committerDavid Luevano Alvarado <david@luevano.xyz>2023-06-06 06:45:25 -0600
commit4859336ea0b05d5cb54ebadcb80d1b6982c96b0c (patch)
tree50508ff46b582174b3a05c526d23c72b9fb92026 /lua/plugins
parent3a85b9f495513b9ae9503aae16f04e1ed94662d2 (diff)
fine tune settings, lualine now looks like power/air line
Diffstat (limited to 'lua/plugins')
-rw-r--r--lua/plugins/autocompletion.lua37
-rw-r--r--lua/plugins/lualine.lua6
2 files changed, 25 insertions, 18 deletions
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({
['<C-n>'] = cmp.mapping.select_next_item(),
['<C-p>'] = cmp.mapping.select_prev_item(),
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
- ['<C-Space>'] = cmp.mapping.complete {},
- ['<CR>'] = cmp.mapping.confirm {
+ ['<C-Space>'] = cmp.mapping.complete(),
+ ['<CR>'] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true,
- },
+ }),
['<Tab>'] = 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 = '',
},
},
}