return {
- 'tpope/vim-surround',
- 'tpope/vim-obsession',
- 'tpope/vim-endwise',
- 'tpope/vim-repeat',
- 'tpope/vim-commentary',
- 'junegunn/fzf',
- 'junegunn/fzf.vim',
- 'lukas-reineke/indent-blankline.nvim',
- 'christoomey/vim-tmux-navigator',
- 'norcalli/nvim-colorizer.lua',
- 'Maan2003/lsp_lines.nvim',
'mbbill/undotree',
+ { 'christoomey/vim-tmux-navigator', lazy = false },
+ { 'norcalli/nvim-colorizer.lua', lazy = false },
+ { 'lukas-reineke/indent-blankline.nvim', lazy = false },
+ { 'tpope/vim-repeat', lazy = false },
+ { 'tpope/vim-obsession', lazy = false },
+ { 'tpope/vim-surround', lazy = false },
+ { 'tpope/vim-endwise', lazy = false },
+ { 'tpope/vim-commentary', lazy = false },
+
+ {
+ 'junegunn/fzf.vim',
+ dependencies = {'junegunn/fzf'},
+ lazy = false
+ },
+
{
'akinsho/toggleterm.nvim',
+ lazy = false,
opts = {
shade_terminals = false,
size = 10
return {
- {
- 'hrsh7th/nvim-cmp',
+ {
+ 'hrsh7th/nvim-cmp',
+ version = false,
dependencies = {
'onsails/lspkind.nvim',
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
'hrsh7th/cmp-cmdline',
+ 'hrsh7th/cmp-vsnip',
+ 'hrsh7th/vim-vsnip',
},
- opts = function()
- local cmp = require('cmp')
- return {
- view = { entries = {name = 'custom', selection_order = 'near_cursor'} },
- formatting = { format= require('lspkind').cmp_format({ mode = 'symbol_text' }), },
- mapping = require('nvim-cmp').mapping.preset.insert({
- ['<C-j>'] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }),
- ['<C-k>'] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }),
- ['<C-p>'] = cmp.mapping.scroll_docs(-4),
- ['<C-n>'] = cmp.mapping.scroll_docs(4),
- ['<CR>'] = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true, }),
- }),
- sources = cmp.config.sources({
- { name = 'nvim_lsp' },
- { name = 'path' },
- { name = 'buffer' }
- }),
- cmdline(':', {
- view = { entries = {name = 'wildmenu', separator = '|'} },
+ config = function()
+ local cmp = require'cmp'
+ cmp.setup({
+ snippet = { expand = function(args) vim.fn["vsnip#anonymous"](args.body) end, },
+ formatting = {
+ format = require('lspkind').cmp_format({ mode = "text_symbol" })
+ },
+ window = { },
+ mapping = cmp.mapping.preset.insert({
+ ['<C-b>'] = cmp.mapping.scroll_docs(-4),
+ ['<C-f>'] = cmp.mapping.scroll_docs(4),
+ ['<C-Space>'] = cmp.mapping.complete(),
+ ['<C-e>'] = cmp.mapping.abort(),
+ ['<CR>'] = cmp.mapping.confirm({ select = true }),
+ }),
+ sources = cmp.config.sources({
+ { name = 'nvim_lsp' },
+ { name = 'vsnip' },
+ { name = 'buffer' },
+ })
+ })
+
+ cmp.setup.cmdline({ '/', '?' }, {
+ view = { entries = {
+ name = 'wildmenu',
+ separator = '|',
+ selection_order = 'near_cursor',
+ } },
+ mapping = cmp.mapping.preset.cmdline(),
+ sources = { { name = 'buffer' } }
+ })
+
+ cmp.setup.cmdline(':', {
+ view = { entries = {
+ name = 'wildmenu',
+ separator = '|',
+ selection_order = 'near_cursor',
+ } },
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({ { name = 'path' } }, { { name = 'cmdline' } })
})
- }
+
+ local capabilities = require('cmp_nvim_lsp').default_capabilities()
+ require('lspconfig')['rust_analyzer'].setup { capabilities = capabilities }
end
},
}
return {
{
'neovim/nvim-lspconfig',
+ event = { 'BufReadPre', 'BufNewFile' },
dependencies = {
- "mason.nvim",
- "nvim-cmp",
- "williamboman/mason-lspconfig.nvim",
+ 'nvim-cmp',
+ 'nvim-treesitter',
+ 'Maan2003/lsp_lines.nvim',
+ { 'williamboman/mason.nvim', build = ':MasonUpdate' },
+ 'williamboman/mason-lspconfig',
},
- opts = {
- diagnostics = {
+ config = function()
+ vim.lsp.diagnostics = {
virtual_text = false,
virtual_lines = true,
signs = false,
update_in_insert = false,
severity_sort = true,
}
- },
- setup = {}
- },
- {
- 'nvim-treesitter/nvim-treesitter',
- opts = {
- ensure_installed = {
- "c",
- "bash",
- "comment",
- "html",
- "json",
- "markdown",
- "rust",
- "regex",
- "ruby"
- },
- sync_install = true,
- auto_install = true,
- highlight = { enable = true, additional_vim_regex_highlighting = true, },
- indent = { enable = false },
- }
- },
+ local lspconfig = require('lspconfig')
+ require('mason').setup()
- {
- "williamboman/mason.nvim",
- cmd = "Mason",
- opts = {
- ensure_installed = {
- "stylua",
- "shfmt",
- },
- },
+ require('mason-lspconfig').setup({
+ automatic_installation = true,
+ ensure_installed = {}
+ })
+
+ require('mason-lspconfig').setup_handlers({
+ function (server_name)
+ lspconfig[server_name].setup({})
+ end
+ })
+ end
},
{
"jose-elias-alvarez/null-ls.nvim",
event = { "BufReadPre", "BufNewFile" },
- dependencies = { "mason.nvim" },
- opts = function()
- local nls = require("null-ls")
- return {
- root_dir = require("null-ls.utils").root_pattern(".null-ls-root", ".neoconf.json", "Makefile", ".git"),
- sources = {
- nls.builtins.formatting.stylua,
- nls.builtins.formatting.shfmt,
- },
- }
- end
+ dependencies = {
+ "mason.nvim",
+ "nvim-lua/plenary.nvim",
+ {
+ "jay-babu/mason-null-ls.nvim",
+ opts = { automatic_setup = true }
+ }
+ },
},
+
}
--- /dev/null
+return {
+ {
+ 'nvim-treesitter/nvim-treesitter',
+ build = function()
+ require('nvim-treesitter.install').update( { with_sync = true } )
+ end,
+ event = { 'BufReadPost', 'BufNewFile' },
+ config = function()
+ require('nvim-treesitter.configs').setup {
+ sync_install = true,
+ auto_install = true,
+ highlight = { enable = true },
+ indent = { enable = true },
+ }
+ end
+ },
+}
vim.o.wrapscan = true
vim.o.wildmenu = true
--- vim.o.wildignore = { '*.docx','*.jpg','*.png','*.pdf','*.pyc','*.exe','*.flv','*.img','*.xlsx' }
vim.o.tabstop = 4
vim.o.shiftwidth = 4
vim.o.foldenable = true
vim.o.foldlevelstart = 5
vim.o.foldmethod = 'indent'
--- vim.o.foldmarker = { '-v-','-^-' }
--- vim.o.backspace = { 'indent','eol','start' }
vim.o.ttimeout = true
vim.o.ttimeoutlen = 1
vim.o.showtabline = 0
vim.o.termguicolors = true
--- vim.o.completeopt = { 'menu', 'menuone', 'noselect' }
-
-vim.o.pumblend = 30
-vim.o.pumwidth = 50
vim.o.jumpoptions = 'stack'
vim.o.so = 10