From 9b5ef176ed36f42e935e7ae0703c2a632e7b74e6 Mon Sep 17 00:00:00 2001 From: pegasust Date: Wed, 23 Nov 2022 23:40:33 +0000 Subject: [PATCH] nvim: copium on treesitter auto-indent (it is awful) --- home-nix/home.nix | 4 ++++ neovim/init.lua | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/home-nix/home.nix b/home-nix/home.nix index a713860..982dcaa 100644 --- a/home-nix/home.nix +++ b/home-nix/home.nix @@ -119,6 +119,10 @@ lola = "log --graph --decorate --pretty=oneline --abbrev-commit --all"; sts = "status"; }; + # No idea why this is not appearing in home-manager search + # It's in source code, though + userName="pegasust"; + userEmail="pegasucksgg@gmail.com"; extraConfig = { merge = { tool = "vimdiff"; conflictstyle = "diff3"; }; }; diff --git a/neovim/init.lua b/neovim/init.lua index a50703d..4b97ea2 100644 --- a/neovim/init.lua +++ b/neovim/init.lua @@ -45,7 +45,7 @@ Plug('hrsh7th/cmp-buffer') Plug('hrsh7th/cmp-cmdline') Plug('hrsh7th/nvim-cmp') Plug('onsails/lspkind-nvim') -Plug('yioneko/nvim-yati') -- hopefully fixes Python indentation auto-correct from Tree-sitter +Plug('yioneko/nvim-yati', { tag = '*'}) -- hopefully fixes Python indentation auto-correct from Tree-sitter -- Plug('tzachar/cmp-tabnine', { ['do'] = './install.sh' }) -- DevExp @@ -281,7 +281,8 @@ end, { desc = '[Z]ettelkasten [G]rep' }) -- treesitter require('nvim-treesitter.configs').setup { - yati = { enable = true, default_lazy = true }, + yati = { enable = true, default_lazy = true, default_fallback = "auto"}, + indent = { enable = false }, ensure_installed = { 'tsx', 'toml', 'lua', 'typescript', 'rust', 'go', 'yaml', 'json', 'php', 'css', 'python', 'prisma', 'html', "dockerfile", "c", "cpp", "hcl", "svelte", "astro", @@ -289,7 +290,6 @@ require('nvim-treesitter.configs').setup { }, sync_install = false, highlight = { enable = true }, - indent = { enable = false }, incremental_selection = { enable = true, keymaps = {