From 288c21d5b6a6bfd257f0378ba28320ff9625d89a Mon Sep 17 00:00:00 2001 From: Elias Almqvist Date: Thu, 25 Jan 2024 22:06:55 +0100 Subject: [PATCH 1/2] NvChad LSP stuff --- nvchad/.config/nvim/lua/custom/configs/overrides.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nvchad/.config/nvim/lua/custom/configs/overrides.lua b/nvchad/.config/nvim/lua/custom/configs/overrides.lua index c4cd2c7..0a867a2 100644 --- a/nvchad/.config/nvim/lua/custom/configs/overrides.lua +++ b/nvchad/.config/nvim/lua/custom/configs/overrides.lua @@ -12,6 +12,7 @@ M.treesitter = { "c", "markdown", "markdown_inline", + "haskell", }, indent = { enable = true, @@ -37,6 +38,9 @@ M.mason = { -- c/cpp stuff "clangd", "clang-format", + + -- Fun/joke langs + "hls", }, } From 149290412ec11787619d9c87ba42aa30253493d6 Mon Sep 17 00:00:00 2001 From: Elias Almqvist Date: Fri, 26 Jan 2024 13:46:34 +0100 Subject: [PATCH 2/2] Haskell stuff for NvChad --- nvchad/.config/nvim/lua/custom/configs/conform.lua | 3 +++ .../.config/nvim/lua/custom/configs/lspconfig.lua | 14 +++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/nvchad/.config/nvim/lua/custom/configs/conform.lua b/nvchad/.config/nvim/lua/custom/configs/conform.lua index 17e6f0b..d590c66 100644 --- a/nvchad/.config/nvim/lua/custom/configs/conform.lua +++ b/nvchad/.config/nvim/lua/custom/configs/conform.lua @@ -18,6 +18,9 @@ local options = { python = { "black" }, sh = { "shfmt" }, + + -- Joke langs + haskell = { "stylish-haskell" } }, -- adding same formatter for multiple filetypes can look too much work for some diff --git a/nvchad/.config/nvim/lua/custom/configs/lspconfig.lua b/nvchad/.config/nvim/lua/custom/configs/lspconfig.lua index b823ef1..319a8e0 100644 --- a/nvchad/.config/nvim/lua/custom/configs/lspconfig.lua +++ b/nvchad/.config/nvim/lua/custom/configs/lspconfig.lua @@ -1,18 +1,18 @@ local on_attach = require("plugins.configs.lspconfig").on_attach local capabilities = require("plugins.configs.lspconfig").capabilities -local lspconfig = require "lspconfig" +local lspconfig = require("lspconfig") -- if you just want default config for the servers then put them in a table -local servers = { "html", "cssls", "tsserver", "clangd", "ghdl_ls" } +local servers = { "html", "cssls", "tsserver", "clangd", "ghdl_ls", "hls" } for _, lsp in ipairs(servers) do - lspconfig[lsp].setup { - on_attach = on_attach, - capabilities = capabilities, - } + lspconfig[lsp].setup({ + on_attach = on_attach, + capabilities = capabilities, + }) end --- +-- -- lspconfig.pyright.setup { blabla} --