From 5b8f5dbeb25700219303a536920338480a6eae82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Tue, 8 Jul 2025 14:15:00 +0200 Subject: [PATCH] nvim: nice hls default settings credit: mrcjkb --- .config/nvim/after/plugin/lsp.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.config/nvim/after/plugin/lsp.lua b/.config/nvim/after/plugin/lsp.lua index d3720440..08e22394 100644 --- a/.config/nvim/after/plugin/lsp.lua +++ b/.config/nvim/after/plugin/lsp.lua @@ -242,6 +242,19 @@ vim.g.haskell_tools = { vim.opt_local.shiftwidth = 2 on_attach(client, bufnr) end, + default_settings = { + haskell = { + checkProject = false, -- PERF: don't check the entire project on initial load + formattingProvider = "fourmolu", + plugin = { + rename = { + config = { + diff = true, -- (experimental) rename across modules + }, + }, + }, + }, + }, settings = function(project_root) local ht = require("haskell-tools") return ht.lsp.load_hls_settings(project_root, { settings_file_pattern = "hls.json" })