Refactor packer config to use packer config parameter instead of

separate requires
main
Marko Korhonen 2 years ago
parent 989ab0c42a
commit b985e8a28a
No known key found for this signature in database
GPG Key ID: 911B85FBC6003FE5

@ -17,4 +17,4 @@ require('jdtls').start_or_attach({
}
})
require('plugins.lsp').lsp_map_keys('jdtls', nil)
require('plugins.lspconfig').lsp_map_keys('jdtls', nil)

@ -1 +0,0 @@
require('bufferline').setup{}

@ -0,0 +1,68 @@
return function()
-- Setup git completion source
require("cmp_git").setup()
-- Set completeopt to have a better completion experience
vim.o.completeopt = 'menuone,noselect'
-- luasnip setup
local luasnip = require 'luasnip'
-- nvim-cmp setup
local cmp = require 'cmp'
cmp.setup {
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body)
end,
},
mapping = {
['<C-p>'] = cmp.mapping.select_prev_item(),
['<C-n>'] = cmp.mapping.select_next_item(),
['<C-d>'] = 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.Replace,
select = true,
},
['<Tab>'] = function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end,
['<S-Tab>'] = function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end,
},
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'path' },
{ name = 'git' },
{ name = 'buffer' },
},
}
-- Enable autopairs when enter is processed
-- on completion
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
cmp.event:on(
'confirm_done',
cmp_autopairs.on_confirm_done()
)
-- load friendly-snippets to luasnip
require('luasnip/loaders/from_vscode').lazy_load()
end

@ -1,49 +1,51 @@
require('catppuccin').setup({
transparent_background = false,
term_colors = false,
compile = {enabled = true, path = vim.fn.stdpath 'cache' .. '/catppuccin'},
styles = {
comments = {'italic'},
functions = {'italic'},
keywords = {'italic'},
strings = {},
variables = {}
},
integrations = {
treesitter = true,
native_lsp = {
enabled = true,
virtual_text = {
errors = {'italic'},
hints = {'italic'},
warnings = {'italic'},
information = {'italic'}
},
underlines = {
errors = {'underline'},
hints = {'underline'},
warnings = {'underline'},
information = {'underline'}
}
},
lsp_trouble = false,
lsp_saga = false,
gitgutter = true,
gitsigns = false,
telescope = true,
nvimtree = {enabled = false, show_root = false},
which_key = false,
indent_blankline = {enabled = true, colored_indent_levels = false},
dashboard = false,
neogit = false,
vim_sneak = false,
fern = false,
barbar = false,
bufferline = false,
markdown = false,
lightspeed = false,
ts_rainbow = false,
hop = false
}
})
vim.cmd [[colorscheme catppuccin]]
return function ()
require('catppuccin').setup({
transparent_background = false,
term_colors = false,
compile = {enabled = true, path = vim.fn.stdpath 'cache' .. '/catppuccin'},
styles = {
comments = {'italic'},
functions = {'italic'},
keywords = {'italic'},
strings = {},
variables = {}
},
integrations = {
treesitter = true,
native_lsp = {
enabled = true,
virtual_text = {
errors = {'italic'},
hints = {'italic'},
warnings = {'italic'},
information = {'italic'}
},
underlines = {
errors = {'underline'},
hints = {'underline'},
warnings = {'underline'},
information = {'underline'}
}
},
lsp_trouble = false,
lsp_saga = false,
gitgutter = true,
gitsigns = false,
telescope = true,
nvimtree = {enabled = false, show_root = false},
which_key = false,
indent_blankline = {enabled = true, colored_indent_levels = false},
dashboard = false,
neogit = false,
vim_sneak = false,
fern = false,
barbar = false,
bufferline = false,
markdown = false,
lightspeed = false,
ts_rainbow = false,
hop = false
}
})
vim.cmd [[colorscheme catppuccin]]
end

@ -1,67 +0,0 @@
-- Add additional capabilities supported by nvim-cmp
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
--
-- Set completeopt to have a better completion experience
vim.o.completeopt = 'menuone,noselect'
-- luasnip setup
local luasnip = require 'luasnip'
-- nvim-cmp setup
local cmp = require 'cmp'
cmp.setup {
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body)
end,
},
mapping = {
['<C-p>'] = cmp.mapping.select_prev_item(),
['<C-n>'] = cmp.mapping.select_next_item(),
['<C-d>'] = 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.Replace,
select = true,
},
['<Tab>'] = function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end,
['<S-Tab>'] = function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end,
},
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'path' },
{ name = 'git' },
{ name = 'buffer' },
},
}
-- Enable autopairs when enter is processed
-- on completion
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
cmp.event:on(
'confirm_done',
cmp_autopairs.on_confirm_done()
)
-- load friendly-snippets to luasnip
require('luasnip/loaders/from_vscode').lazy_load()

@ -1,7 +1,8 @@
vim.opt.list = true
require('indent_blankline').setup {
space_char_blankline = ' ',
show_current_context = true,
show_current_context_start = true,
}
return function ()
vim.opt.list = true
require('indent_blankline').setup {
space_char_blankline = ' ',
show_current_context = true,
show_current_context_start = true,
}
end

@ -3,157 +3,183 @@ local fn = vim.fn
-- Install packer if it's not yet installed
local install_path = fn.stdpath('data') .. '/site/pack/packer/opt/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
print('Installing Packer')
Packer_bootstrap = fn.system({
'git', 'clone', '--depth', '1',
'https://github.com/wbthomason/packer.nvim', install_path
})
vim.o.runtimepath = vim.fn.stdpath('data') .. '/site/pack/*/start/*,' ..
vim.o.runtimepath
print('Installed Packer')
print('Installing Packer')
Packer_bootstrap = fn.system({
'git', 'clone', '--depth', '1',
'https://github.com/wbthomason/packer.nvim', install_path
})
vim.o.runtimepath = vim.fn.stdpath('data') .. '/site/pack/*/start/*,' ..
vim.o.runtimepath
print('Installed Packer')
end
-- Configure packer
vim.cmd [[packadd packer.nvim]]
require('packer').startup(function()
local use = require('packer').use
local use = require('packer').use
-- The plugin manager itself
use {'wbthomason/packer.nvim', opt = true}
-- The plugin manager itself
use { 'wbthomason/packer.nvim', opt = true }
-- Colorscheme
use({'catppuccin/nvim', as = 'catppuccin'})
-- Colorscheme
use {
'catppuccin/nvim',
as = 'catppuccin',
config = require('plugins.colorscheme'),
}
-- Git in signcolumn
use 'airblade/vim-gitgutter'
-- Git in signcolumn
use 'airblade/vim-gitgutter'
-- Statusline
use {
'hoob3rt/lualine.nvim',
requires = {'kyazdani42/nvim-web-devicons', opt = true}
}
-- Statusline
use {
'hoob3rt/lualine.nvim',
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
config = function()
require('lualine').setup {
options = { theme = 'catppuccin' }
}
end,
}
-- Tabline/bufferline
use {
'akinsho/nvim-bufferline.lua',
tag = '*',
requires = 'kyazdani42/nvim-web-devicons'
}
-- Tabline/bufferline
use {
'akinsho/nvim-bufferline.lua',
tag = '*',
requires = 'kyazdani42/nvim-web-devicons',
config = function() require('bufferline').setup {} end
}
-- Git commands
use 'tpope/vim-fugitive'
-- Git commands
use 'tpope/vim-fugitive'
-- Indent characters
use 'lukas-reineke/indent-blankline.nvim'
-- Indent characters
use {
'lukas-reineke/indent-blankline.nvim',
config = require('plugins.indent-blankline')
}
-- Tree explorer
use {'kyazdani42/nvim-tree.lua', requires = 'kyazdani42/nvim-web-devicons'}
-- Tree explorer
use {
'kyazdani42/nvim-tree.lua',
requires = 'kyazdani42/nvim-web-devicons',
config = function() require('nvim-tree').setup {} end
}
-- Telescope
use {
'nvim-telescope/telescope.nvim',
requires = {{'nvim-lua/plenary.nvim'}}
}
use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make'} -- Use fzf for fuzzy finder
use {'nvim-telescope/telescope-ui-select.nvim'} -- Replace vim built in select with telescope
-- Telescope
use {
'nvim-telescope/telescope.nvim',
config = require('plugins.telescope'),
requires = {
{ 'nvim-lua/plenary.nvim' }, -- Internal dep for telescope
{ 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }, -- Use fzf for fuzzy finder
{ 'nvim-telescope/telescope-ui-select.nvim' } -- Replace vim built in select with telescope
}
}
-- Do stuff as sudo
use 'lambdalisue/suda.vim'
-- Do stuff as sudo
use 'lambdalisue/suda.vim'
-- Display possible keybinds
use {
'folke/which-key.nvim',
config = function()
require('which-key').setup {}
end
config = function() require('which-key').setup {} end
}
-- Read editorconfig settings
use 'editorconfig/editorconfig-vim'
-- Configs for built-in LSP
use 'neovim/nvim-lspconfig'
-- Install LSP server executables
use {
'williamboman/mason.nvim',
config = function() require('mason').setup {} end
}
use {
'williamboman/mason-lspconfig.nvim',
config = function()
require('mason-lspconfig').setup { automatic_installation = true }
end
}
-- Install LSP server executables
use {'williamboman/mason.nvim', 'williamboman/mason-lspconfig.nvim'}
-- Configs for built-in LSP
use {
'neovim/nvim-lspconfig',
config = require('plugins.lspconfig').setup
}
-- Additional LSP features for Java
use 'mfussenegger/nvim-jdtls'
-- Additional LSP features for Java
use 'mfussenegger/nvim-jdtls'
-- Display function signature
use {'ray-x/lsp_signature.nvim'}
-- Display function signature
use 'ray-x/lsp_signature.nvim'
-- Completion
use {
'hrsh7th/nvim-cmp',
requires = {
{ 'hrsh7th/cmp-nvim-lsp' }, -- LSP source
{ 'hrsh7th/cmp-path' }, -- Path source
{ 'petertriho/cmp-git', requires = "nvim-lua/plenary.nvim" }, -- Git source
{ 'hrsh7th/cmp-buffer' }, -- Buffer source
{ 'saadparwaiz1/cmp_luasnip' }, -- Snippets source
{ 'L3MON4D3/LuaSnip' }, -- Snippets plugin
{ 'rafamadriz/friendly-snippets' }, -- Snippets collection
},
config = require('plugins.cmp'),
}
-- Completion
use 'hrsh7th/nvim-cmp' -- Autocompletion plugin
use 'hrsh7th/cmp-nvim-lsp' -- LSP source for nvim-cmp
use 'hrsh7th/cmp-path' -- Path source for nvim-cmp
use 'petertriho/cmp-git' -- Git source for nvim-cmp
use 'hrsh7th/cmp-buffer' -- Buffer source for nvim-cmp
use 'saadparwaiz1/cmp_luasnip' -- Snippets source for nvim-cmp
use 'L3MON4D3/LuaSnip' -- Snippets plugin
use 'rafamadriz/friendly-snippets' -- Snippets collection
-- Enable brackets for completions
-- Automatic brackets
use {
'windwp/nvim-autopairs',
config = function() require('nvim-autopairs').setup {} end
config = function() require('nvim-autopairs').setup{} end
}
-- treesitter syntax highlight
use {
'nvim-treesitter/nvim-treesitter',
run = function()
require('nvim-treesitter.install').update({with_sync = true})
end
}
-- treesitter
use {
'nvim-treesitter/nvim-treesitter',
run = function()
require('nvim-treesitter.install').update({ with_sync = true })
end,
config = require('plugins.treesitter')
}
-- treesitter plugin for commentstring
use 'JoosepAlviste/nvim-ts-context-commentstring'
-- treesitter plugin for commentstring
use 'JoosepAlviste/nvim-ts-context-commentstring'
-- Additional plugins for formats not supported
-- by treesitter
use 'jamespeapen/swayconfig.vim'
-- Additional plugins for formats not supported
-- by treesitter
use 'jamespeapen/swayconfig.vim'
-- mappings for commenting in code
use 'tpope/vim-commentary'
-- mappings for commenting in code
use 'tpope/vim-commentary'
-- we all know this one
use 'tpope/vim-surround'
-- we all know this one
use 'tpope/vim-surround'
-- Formatter plugin
use 'sbdchd/neoformat'
-- Formatter plugin
use 'sbdchd/neoformat'
-- Make editing passwords safer
use {
'https://git.zx2c4.com/password-store',
rtp = 'contrib/vim/redact_pass.vim'
}
-- Make editing passwords safer
use {
'https://git.zx2c4.com/password-store',
rtp = 'contrib/vim/redact_pass.vim'
}
-- Neovim inside Firefox
use {
'glacambre/firenvim',
run = function() vim.fn['firenvim#install'](0) end
}
-- Neovim inside Firefox
use {
'glacambre/firenvim',
run = function() vim.fn['firenvim#install'](0) end
}
-- Vim <3 Asciidoctor
use 'habamax/vim-asciidoctor'
-- Vim <3 Asciidoctor
use 'habamax/vim-asciidoctor'
end)
-- Sync plugins if Packer was just
-- installed
if Packer_bootstrap then
print('Syncing plugins')
require('packer').sync()
print('Synced')
print('Syncing plugins')
require('packer').sync()
print('Synced')
end
-- Source configurations
require 'plugins/lualine'
require 'plugins/bufferline'
require 'plugins/lsp'
require 'plugins/completion'
require 'plugins/treesitter'
require 'plugins/indent-blankline'
require 'plugins/nvim-tree'
require 'plugins/colorscheme'
require 'plugins/telescope'

@ -1,89 +0,0 @@
local M = {}
local lspconfig = require('lspconfig');
--
M.lsp_map_keys = function(server, bufnr)
local function map_key(...)
-- Map to buffer if buffer number is supplied,
-- globally otherwise
if bufnr == nil then
vim.api.nvim_set_keymap(...)
else
vim.api.nvim_buf_set_keymap(bufnr, ...)
end
end
local keymapOpts = {noremap = true, silent = true}
map_key('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', keymapOpts)
map_key('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', keymapOpts)
map_key('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', keymapOpts)
map_key('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', keymapOpts)
map_key('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>',
keymapOpts)
map_key('n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>',
keymapOpts)
map_key('n', '<space>wr',
'<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', keymapOpts)
map_key('n', '<space>wl',
'<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>',
keymapOpts)
map_key('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>',
keymapOpts)
map_key('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', keymapOpts)
map_key('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>',
keymapOpts)
map_key('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', keymapOpts)
map_key('n', '<space>e',
'<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>',
keymapOpts)
map_key('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<CR>', keymapOpts)
map_key('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<CR>', keymapOpts)
map_key('n', '<space>q', '<cmd>lua vim.diagnostic.set_loclist()<CR>',
keymapOpts)
map_key('n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', keymapOpts)
end
-- Add additional capabilities supported by nvim-cmp
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
-- Setup LSP signature plugin
require('lsp_signature').setup()
-- Setup mason
require("mason").setup()
require("mason-lspconfig").setup({automatic_installation = true})
-- LSP servers setup
lspconfig.tsserver.setup {{}, on_attach = M.lsp_map_keys}
lspconfig.yamlls.setup {{}, on_attach = M.lsp_map_keys}
lspconfig.jsonls.setup {{}, on_attach = M.lsp_map_keys}
lspconfig.html.setup {{}, on_attach = M.lsp_map_keys}
lspconfig.marksman.setup {{}, on_attach = M.lsp_map_keys}
lspconfig.sumneko_lua.setup {
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
-- Setup your lua path
path = vim.split(package.path, ';')
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = {'vim'}
},
workspace = {
-- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file('', true)
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {enable = false}
}
},
on_attach = M.lsp_map_keys,
capabilities = capabilities
}
return M

@ -0,0 +1,103 @@
local M = {}
function lsp_map_keys(server, bufnr)
print('lsp_map_keys')
local function map_key(...)
-- Map to buffer if buffer number is supplied,
-- globally otherwise
if bufnr == nil then
vim.api.nvim_set_keymap(...)
else
vim.api.nvim_buf_set_keymap(bufnr, ...)
end
end
local keymapOpts = { noremap = true, silent = true }
map_key('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', keymapOpts)
map_key('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', keymapOpts)
map_key('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', keymapOpts)
map_key('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', keymapOpts)
map_key('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>',
keymapOpts)
map_key('n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>',
keymapOpts)
map_key('n', '<space>wr',
'<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', keymapOpts)
map_key('n', '<space>wl',
'<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>',
keymapOpts)
map_key('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>',
keymapOpts)
map_key('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', keymapOpts)
map_key('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>',
keymapOpts)
map_key('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', keymapOpts)
map_key('n', '<space>e',
'<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>',
keymapOpts)
map_key('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<CR>', keymapOpts)
map_key('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<CR>', keymapOpts)
map_key('n', '<space>q', '<cmd>lua vim.diagnostic.set_loclist()<CR>',
keymapOpts)
map_key('n', '<space>f', '<cmd>lua vim.lsp.buf.format()<CR>', keymapOpts)
end
M.on_attach = function(server, bufnr)
print('on_attach')
-- Setup lsp signature plugin
require('lsp_signature').setup {}
-- Setup keybinds
lsp_map_keys(server, bufnr)
end
function M.setup()
local lspconfig = require('lspconfig')
local capabilities = vim.lsp.protocol.make_client_capabilities()
-- Common settings for all servers
local lsp_defaults = {
on_attach = M.on_attach, -- Common on_attach
capabilities = capabilities -- Add additional capabilities supported by nvim-cmp
}
-- Set default config for all servers
--lspconfig.util.default_config = vim.tbl_deep_extend('force', lspconfig.util.default_config, lsp_defaults)
-- Register capabilities to cmp.nvim
--require('cmp_nvim_lsp').update_capabilities(capabilities)
-- LSP servers setup
--lspconfig.tsserver.setup {}
--lspconfig.yamlls.setup {}
--lspconfig.jsonls.setup {}
--lspconfig.html.setup {}
--lspconfig.marksman.setup {}
--lspconfig.sumneko_lua.setup {
-- settings = {
-- Lua = {
-- runtime = {
-- -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
-- version = 'LuaJIT',
-- -- Setup your lua path
-- path = vim.split(package.path, ';')
-- },
-- diagnostics = {
-- -- Get the language server to recognize the `vim` global
-- globals = { 'vim' }
-- },
-- workspace = {
-- -- Make the server aware of Neovim runtime files
-- library = vim.api.nvim_get_runtime_file('', true)
-- },
-- -- Do not send telemetry data containing a randomized but unique identifier
-- telemetry = { enable = false }
-- }
-- }
--}
end
return M

@ -1 +0,0 @@
require'nvim-tree'.setup {}

@ -1,4 +1,6 @@
local telescope = require('telescope')
telescope.setup {}
telescope.load_extension('fzf')
telescope.load_extension('ui-select')
return function ()
local telescope = require('telescope')
telescope.setup {}
telescope.load_extension('fzf')
telescope.load_extension('ui-select')
end

@ -1,14 +1,16 @@
require'nvim-treesitter.configs'.setup {
ensure_installed = {
'bash', 'c', 'css', 'dockerfile', 'html', 'http', 'java', 'json',
'json5', 'latex', 'lua', 'make', 'markdown', 'php', 'python', 'regex',
'rst', 'scss', 'toml', 'tsx', 'typescript', 'javascript', 'yaml'
},
highlight = {enable = true},
indent = {enable = true},
incremental_selection = {enable = true},
context_commentstring = {enable = true}
}
return function ()
require'nvim-treesitter.configs'.setup {
ensure_installed = {
'bash', 'c', 'css', 'dockerfile', 'html', 'http', 'java', 'json',
'json5', 'latex', 'lua', 'make', 'markdown', 'php', 'python', 'regex',
'rst', 'scss', 'toml', 'tsx', 'typescript', 'javascript', 'yaml'
},
highlight = {enable = true},
indent = {enable = true},
incremental_selection = {enable = true},
context_commentstring = {enable = true}
}
--vim.wo.foldmethod = 'expr'
--im.wo.foldexpr = 'nvim_treesitter#foldexpr()'
--vim.wo.foldmethod = 'expr'
--im.wo.foldexpr = 'nvim_treesitter#foldexpr()'
end

Loading…
Cancel
Save