Mercurial > dotfiles
comparison .chezmoitemplates/init.lua @ 463:1d2e33dfe0c6
Clean up folding and foldtexts
author | zegervdv <zegervdv@me.com> |
---|---|
date | Fri, 24 Sep 2021 10:03:31 +0200 |
parents | 676d7ef5fecb |
children | 48521caaf918 |
comparison
equal
deleted
inserted
replaced
462:676d7ef5fecb | 463:1d2e33dfe0c6 |
---|---|
563 n = true, -- Normal mode | 563 n = true, -- Normal mode |
564 i = true, -- Insert mode | 564 i = true, -- Insert mode |
565 c = true, -- Commandline mode | 565 c = true, -- Commandline mode |
566 } | 566 } |
567 | 567 |
568 opt.foldmethod = 'expr' | |
569 opt.foldexpr = 'nvim_treesitter#foldexpr()' | |
570 opt.foldnestmax = 3 | |
571 opt.foldminlines = 1 | |
572 opt.foldtext = | |
573 [[substitute(getline(v:foldstart),'\\t',repeat('\ ',&tabstop),'g').'...'.trim(getline(v:foldend)) . ' (' . (v:foldend - v:foldstart + 1) . ' lines)']] | |
574 opt.foldenable = false | |
575 | |
568 -- LSP config | 576 -- LSP config |
569 local lsp = require 'lspconfig' | 577 local lsp = require 'lspconfig' |
570 local null_ls = require 'null-ls' | 578 local null_ls = require 'null-ls' |
571 | 579 |
572 -- Use builtin tagfunc to query LSP | 580 -- Use builtin tagfunc to query LSP |