From 35ba5a3b68e334ea8dc2760536d16f50f2868faa Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Wed, 19 Jun 2024 11:55:59 +0200 Subject: removed treesitter/ breaks indentation --- init.lua | 66 ++++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/init.lua b/init.lua index ce9d584..7f7887f 100644 --- a/init.lua +++ b/init.lua @@ -14,6 +14,8 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) require("lazy").setup({ + 'junegunn/fzf', + 'junegunn/fzf.vim', 'nvim-tree/nvim-web-devicons', 'lewis6991/gitsigns.nvim', 'folke/neodev.nvim', @@ -28,7 +30,8 @@ require("lazy").setup({ 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip', 'RRethy/base16-nvim', - 'nvim-treesitter/nvim-treesitter', + -- treesitter is experimental and breaks indentation on xml, html with `=` + -- 'nvim-treesitter/nvim-treesitter', 'nvim-lua/popup.nvim', 'nvim-lua/plenary.nvim', 'nvim-telescope/telescope.nvim', @@ -93,36 +96,36 @@ end -------------------------------------------------------------------------------- -- plugin setup and options -------------------------------------------------------------------------------- -require'nvim-treesitter.configs'.setup { - -- A list of parser names, or "all" (the five listed parsers should always be installed) - ensure_installed = { "c", "lua", "vim", "vimdoc", "query" }, - modules = {}, - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, - -- Automatically install missing parsers when entering buffer - -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally - auto_install = true, - ignore_install = { "javascript" }, - highlight = { - enable = true, - -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to - -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is - -- the name of the parser) - -- list of language that will be disabled - disable = function(_, buf) - local max_filesize = 100 * 1024 -- 100 KB - local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) - if ok and stats and stats.size > max_filesize then - return true - end - end, - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, -} +-- require'nvim-treesitter.configs'.setup { +-- -- A list of parser names, or "all" (the five listed parsers should always be installed) +-- ensure_installed = { "c", "lua", "vim", "vimdoc", "query" }, +-- modules = {}, +-- -- Install parsers synchronously (only applied to `ensure_installed`) +-- sync_install = false, +-- -- Automatically install missing parsers when entering buffer +-- -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally +-- auto_install = true, +-- ignore_install = { "javascript" }, +-- highlight = { +-- enable = true, +-- -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to +-- -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is +-- -- the name of the parser) +-- -- list of language that will be disabled +-- disable = function(_, buf) +-- local max_filesize = 100 * 1024 -- 100 KB +-- local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) +-- if ok and stats and stats.size > max_filesize then +-- return true +-- end +-- end, +-- -- Setting this to true will run `:h syntax` and tree-sitter at the same time. +-- -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). +-- -- Using this option may slow down your editor, and you may see some duplicate highlights. +-- -- Instead of true it can also be a list of languages +-- additional_vim_regex_highlighting = false, +-- }, +-- } -- vim.wo.foldtext = 'v:lua.vim.treesitter.foldtext()' -- not available yet in my installation vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()' @@ -217,6 +220,7 @@ local capabilities = require('cmp_nvim_lsp').default_capabilities() -- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md -- C/C++ | clang +require('lspconfig')['bitbake_language_server'].setup{capabilities = capabilities} require('lspconfig')['clangd'].setup{capabilities = capabilities} -- lua (but not init.lua entirely, hence why neodev) require('lspconfig')['lua_ls'].setup { capabilities = capabilities } -- cgit v1.2.3