mirror of
https://github.com/WarrenHood/dotfiles.git
synced 2025-04-29 15:25:00 +01:00
Configured autocomplete keybindings a bit better
This commit is contained in:
parent
1ee73f7415
commit
244cb29519
|
@ -1,6 +1,7 @@
|
|||
require("warrenhood.settings")
|
||||
require("warrenhood.keybinds")
|
||||
require("warrenhood.plugins")
|
||||
require("warrenhood.plugins-config")
|
||||
require("warrenhood.mason-config")
|
||||
require("warrenhood.cmp-config")
|
||||
require("warrenhood.theme")
|
||||
|
|
|
@ -6,9 +6,6 @@ cmp.setup({
|
|||
-- REQUIRED - you must specify a snippet engine
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
||||
-- require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
||||
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
|
||||
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
||||
end,
|
||||
vim.lsp.buf.format,
|
||||
},
|
||||
|
@ -24,6 +21,8 @@ cmp.setup({
|
|||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
["<Tab>"] = cmp.mapping(function() if cmp.visible() then cmp.select_next_item() end end),
|
||||
["<S-Tab>"] = cmp.mapping(function() if cmp.visible() then cmp.select_prev_item() end end),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
|
|
|
@ -12,8 +12,11 @@ map('n', '<C-S>', ':w<CR>')
|
|||
map('i', '<C-S>', '<ESC>:w<CR>')
|
||||
|
||||
-- Telescope
|
||||
local builtin = require('telescope.builtin')
|
||||
map('n', '<leader>ff', builtin.find_files)
|
||||
map('n', '<leader>fg', builtin.live_grep)
|
||||
map('n', '<leader>fb', builtin.buffers)
|
||||
map('n', '<leader>fh', builtin.help_tags)
|
||||
local telescope_builtin = require('telescope.builtin')
|
||||
map('n', '<leader>ff', telescope_builtin.find_files)
|
||||
map('n', '<leader>fg', telescope_builtin.live_grep)
|
||||
map('n', '<leader>fb', telescope_builtin.buffers)
|
||||
map('n', '<leader>fh', telescope_builtin.help_tags)
|
||||
|
||||
-- NvimTree Toggle (File Explorer)
|
||||
map('n', '<C-B>', ':NvimTreeToggle<CR>')
|
||||
|
|
2
neovim/.config/nvim/lua/warrenhood/plugins-config.lua
Normal file
2
neovim/.config/nvim/lua/warrenhood/plugins-config.lua
Normal file
|
@ -0,0 +1,2 @@
|
|||
-- nvim-tree setup with defaults
|
||||
require("nvim-tree").setup()
|
|
@ -49,8 +49,19 @@ require("packer").startup(function()
|
|||
requires = { { 'nvim-lua/plenary.nvim' } }
|
||||
}
|
||||
|
||||
-- nvim-tree (File Explorer)
|
||||
use {
|
||||
'nvim-tree/nvim-tree.lua',
|
||||
requires = {
|
||||
'nvim-tree/nvim-web-devicons', -- file icons
|
||||
},
|
||||
tag = 'nightly'
|
||||
}
|
||||
|
||||
-- Automatically set up configuration after cloning packer.nvim
|
||||
if packer_bootstrap then
|
||||
require("packer").sync()
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
|
|
|
@ -24,3 +24,7 @@ o.termguicolors = true
|
|||
|
||||
-- Use space for leader key
|
||||
g.mapleader = " "
|
||||
|
||||
-- Disable netrw
|
||||
g.loaded_netrw = 1
|
||||
g.loaded_netrwPlugin = 1
|
||||
|
|
Loading…
Reference in a new issue