This commit is contained in:
2023-05-21 21:50:34 +02:00
commit 6d37d8b3ae
6 changed files with 207 additions and 0 deletions

25
lua/code-completion.lua Normal file
View File

@ -0,0 +1,25 @@
vim.opt.completeopt = { 'menuone', 'noselect', 'noinsert', 'preview' }
vim.opt.shortmess = vim.opt.shortmess + { c = true }
local cmp = require'cmp'
cmp.setup({
mapping = {
['<S-Tab>'] = cmp.mapping.select_prev_item(),
['<Tab>'] = cmp.mapping.select_next_item(),
['<C-S-f>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.close(),
['<CR>'] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Insert,
select = true,
})
},
sources = {
{ name = 'path' },
{ name = 'nvim_lsp', keyword_length = 3 },
{ name = 'nvim_lsp_signature_help' },
{ name = 'nvim_lua', keyword_length = 2 },
{ name = 'buffer', keyword_length = 2 },
}
})

8
lua/file-explorer.lua Normal file
View File

@ -0,0 +1,8 @@
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- vim.opt.termguicolors = true
require("nvim-tree").setup({
})

3
lua/mason-config.lua Normal file
View File

@ -0,0 +1,3 @@
require("mason").setup()
require("mason-lspconfig").setup()

13
lua/plugins.lua Normal file
View File

@ -0,0 +1,13 @@
return require('packer').startup(function(use)
use 'wbthomason/packer.nvim'
use 'williamboman/mason.nvim'
use 'williamboman/mason-lspconfig.nvim'
use 'neovim/nvim-lspconfig'
use 'hrsh7th/nvim-cmp'
use 'hrsh7th/cmp-nvim-lsp'
use 'hrsh7th/cmp-nvim-lsp-signature-help'
use 'hrsh7th/cmp-path'
use 'hrsh7th/cmp-buffer'
use 'nvim-tree/nvim-tree.lua'
end)