Cleanup nvim config

This commit is contained in:
Valentin Brandl
2022-10-29 02:25:11 +02:00
parent a82be6a321
commit 18791ed12a
3 changed files with 567 additions and 443 deletions

View File

@ -1,20 +1,44 @@
-- init.lua
require('packer').startup(function(use)
use { "williamboman/mason.nvim" }
-- Load custom tree-sitter grammar for org filetype
require('orgmode').setup_ts_grammar()
use {
'VonHeikemen/lsp-zero.nvim',
requires = {
-- LSP Support
{ 'neovim/nvim-lspconfig' },
{ 'williamboman/mason.nvim' },
{ 'williamboman/mason-lspconfig.nvim' },
-- Tree-sitter configuration
require'nvim-treesitter.configs'.setup {
-- If TS highlights are not enabled at all, or disabled via `disable` prop, highlighting will fallback to default Vim syntax highlighting
highlight = {
enable = true,
disable = {'org'}, -- Remove this to use TS highlighter for some of the highlights (Experimental)
additional_vim_regex_highlighting = {'org'}, -- Required since TS highlighter doesn't support all syntax features (conceal)
},
ensure_installed = {'org'}, -- Or run :TSUpdate org
}
-- Autocompletion
{ 'hrsh7th/nvim-cmp' },
{ 'hrsh7th/cmp-buffer' },
{ 'hrsh7th/cmp-path' },
{ 'saadparwaiz1/cmp_luasnip' },
{ 'hrsh7th/cmp-nvim-lsp' },
{ 'hrsh7th/cmp-nvim-lua' },
require('orgmode').setup({
org_agenda_files = {'~/Nextcloud/org/*'},
org_default_notes_file = '~/Nextcloud/org/refile.org',
})
-- Snippets
{ 'L3MON4D3/LuaSnip' },
{ 'rafamadriz/friendly-snippets' },
}
}
use {
'nvim-treesitter/nvim-treesitter',
run = function() require('nvim-treesitter.install').update({ with_sync = true }) end,
}
use { 'kien/ctrlp.vim' }
use { 'tpope/vim-commentary' }
use { 'tpope/vim-surround' }
use { 'vim-scripts/lastpos.vim' }
end)
local lsp = require('lsp-zero')
lsp.preset('recommended')
lsp.setup()
require('nvim-treesitter.configs').setup{highlight={enable=true}}