Skip to content

Commit

Permalink
chore(nvim): update/fix configs
Browse files Browse the repository at this point in the history
  • Loading branch information
kuntau committed Oct 19, 2022
1 parent b2065db commit cd92562
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions config/nvim/lua/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ local debug = false
-- nvim_create_user_command({name}, {command}, {*opts})
local cmd = vim.api.nvim_create_user_command

-- https://github.com/nvim-treesitter/nvim-treesitter/wiki/Installation
vim.api.nvim_create_autocmd({'BufEnter','BufAdd','BufNew','BufNewFile','BufWinEnter'}, {
group = vim.api.nvim_create_augroup('TS_FOLD_WORKAROUND', {}),
callback = function()
vim.opt.foldmethod = 'expr'
vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
end
})

-- Packer commands
cmd('Pac', function (cmd)
vim.cmd 'packadd packer.nvim'
Expand Down
3 changes: 2 additions & 1 deletion config/nvim/lua/config/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ require('nvim-treesitter.configs').setup({
ensure_installed = 'all',
-- ensure_installed = { 'bash', 'cmake', 'comment', 'cpp', 'css', 'dart', 'dockerfile', 'go', 'graphql', 'html', 'javascript', 'json', 'jsonc', 'lua', 'php', 'python', 'regex', 'ruby', 'scss', 'svelte', 'toml', 'tsx', 'typescript', 'vim', 'vue', 'yaml' },
sync_install = true,
auto_install = true,
highlight = {
enable = true,
use_languagetree= true,
addtional_vim_regex_highlighting = true,
addtional_vim_regex_highlighting = false,
},
incremental_selection = {
enable = true,
Expand Down
2 changes: 1 addition & 1 deletion config/nvim/lua/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ end

-- Setup lspconfig with snippet support
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)

for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
Expand Down

0 comments on commit cd92562

Please sign in to comment.