From ec15b966ab8449f49e9916c89ed85782bbd3306d Mon Sep 17 00:00:00 2001
From: Daniel Lundin <daniel@arity.se>
Date: Wed, 28 Dec 2022 14:36:01 +0100
Subject: [PATCH] nvim: treesitter + lsp

---
 .config/nvim/lua/config/plugins/telescope.lua |  1 +
 .../nvim/lua/config/plugins/treesitter.lua    | 51 ++++++++++++++++++-
 2 files changed, 51 insertions(+), 1 deletion(-)

diff --git a/.config/nvim/lua/config/plugins/telescope.lua b/.config/nvim/lua/config/plugins/telescope.lua
index fcc59b1..f374dfb 100644
--- a/.config/nvim/lua/config/plugins/telescope.lua
+++ b/.config/nvim/lua/config/plugins/telescope.lua
@@ -50,6 +50,7 @@ function M.config()
 			-- layout_defaults = {flip_columns = 160},
 			layout_config = {
 				preview_cutoff = 10,
+				prompt_position = "top",
 			},
 			mappings = {
 				i = {
diff --git a/.config/nvim/lua/config/plugins/treesitter.lua b/.config/nvim/lua/config/plugins/treesitter.lua
index a7a5dc7..f012694 100644
--- a/.config/nvim/lua/config/plugins/treesitter.lua
+++ b/.config/nvim/lua/config/plugins/treesitter.lua
@@ -11,7 +11,48 @@ return {
 		},
 		config = function()
 			require("nvim-treesitter.configs").setup({
-				ensure_installed = "all",
+				ensure_installed = {
+					"bash",
+					"c",
+					"cmake",
+					"cpp",
+					"css",
+					"diff",
+					"gitignore",
+					"go",
+					"graphql",
+					"help",
+					"html",
+					"http",
+					"java",
+					"javascript",
+					"jsdoc",
+					"json",
+					"jsonc",
+					"latex",
+					"lua",
+					"markdown",
+					"markdown_inline",
+					"meson",
+					"ninja",
+					"php",
+					"python",
+					"query",
+					"regex",
+					"rust",
+					"scss",
+					"sql",
+					"svelte",
+					"teal",
+					"toml",
+					"tsx",
+					"typescript",
+					"vhs",
+					"vim",
+					"vue",
+					"wgsl",
+					"yaml",
+				},
 				highlight = {
 					enable = true,
 					use_languagetree = true,
@@ -21,6 +62,8 @@ return {
 					enable = false,
 				},
 
+				context_commentstring = { enable = true, enable_autocmd = false },
+
 				playground = {
 					enable = true,
 					disable = {},
@@ -38,6 +81,12 @@ return {
 					},
 				},
 
+				query_linter = {
+					enable = true,
+					use_virtual_text = true,
+					lint_events = { "BufWrite", "CursorHold" },
+				},
+
 				textobjects = {
 					move = {
 						enable = true,