From 014ec633b7bc958133cecb9146f49fc4ce7bfd8a Mon Sep 17 00:00:00 2001 From: Nicole Dresselhaus Date: Fri, 12 Sep 2025 10:57:44 +0200 Subject: [PATCH] haskell-config for nvim & ge_proton install script --- nvim-config/lazyvim.json | 2 +- nvim-config/lua/plugins/avante.lua | 6 +++- nvim-config/lua/plugins/haskell-snippets.lua | 18 ++++++++++ nvim-config/lua/plugins/haskell.lua | 25 ++++++++++++++ nvim-config/lua/plugins/snippets.lua | 21 ++++++++++++ nvim-config/lua/plugins/test.lua | 3 +- scripts/install_latest_ge_proton.bash | 36 ++++++++++++++++++++ 7 files changed, 108 insertions(+), 3 deletions(-) create mode 100644 nvim-config/lua/plugins/haskell-snippets.lua create mode 100644 nvim-config/lua/plugins/haskell.lua create mode 100644 nvim-config/lua/plugins/snippets.lua create mode 100755 scripts/install_latest_ge_proton.bash diff --git a/nvim-config/lazyvim.json b/nvim-config/lazyvim.json index 8b6ac03..cdeb243 100644 --- a/nvim-config/lazyvim.json +++ b/nvim-config/lazyvim.json @@ -1,7 +1,6 @@ { "extras": [ "lazyvim.plugins.extras.coding.blink", - "lazyvim.plugins.extras.coding.luasnip", "lazyvim.plugins.extras.coding.mini-comment", "lazyvim.plugins.extras.coding.mini-snippets", "lazyvim.plugins.extras.coding.mini-surround", @@ -16,6 +15,7 @@ "lazyvim.plugins.extras.editor.snacks_picker", "lazyvim.plugins.extras.editor.telescope", "lazyvim.plugins.extras.formatting.prettier", + "lazyvim.plugins.extras.lang.haskell", "lazyvim.plugins.extras.lang.json", "lazyvim.plugins.extras.lang.markdown", "lazyvim.plugins.extras.lang.nix", diff --git a/nvim-config/lua/plugins/avante.lua b/nvim-config/lua/plugins/avante.lua index f120b7b..f21bab8 100644 --- a/nvim-config/lua/plugins/avante.lua +++ b/nvim-config/lua/plugins/avante.lua @@ -6,6 +6,8 @@ return { -- add any opts here -- for example provider = "ollama", + mode = "legacy", + disable_tools = true, behaviour = { enable_cursor_planning_mode = true, -- enable cursor planning mode! }, @@ -18,6 +20,7 @@ return { max_completion_tokens = 40000, -- Increase this to include reasoning tokens (for reasoning models) stream = true, thinking = true, + disable_tools = true, --system_prompt = "Enable deep thinking subroutine.", -- reasoning_effort = "high", -- low|medium|high, only used for reasoning models }, @@ -26,10 +29,11 @@ return { model = "qwen3:32b", max_completion_tokens = 40000, reasoning_effort = "high", + disable_tools = true, }, }, rag_service = { - enabled = true, -- Enables the RAG service + enabled = false, -- Enables the RAG service host_mount = os.getenv("HOME"), -- Host mount path for the rag service provider = "ollama", -- The provider to use for RAG service (e.g. openai or ollama) llm_model = "cogito", -- The LLM model to use for RAG service diff --git a/nvim-config/lua/plugins/haskell-snippets.lua b/nvim-config/lua/plugins/haskell-snippets.lua new file mode 100644 index 0000000..bf8bf2e --- /dev/null +++ b/nvim-config/lua/plugins/haskell-snippets.lua @@ -0,0 +1,18 @@ +return { + "mrcjkb/haskell-snippets.nvim", + ft = { "haskell", "lhaskell", "cabal" }, + dependencies = { "L3MON4D3/LuaSnip" }, + -- falls Lazy mal falsch cached: lade LuaSnip aktiv vorher + init = function() + if not package.loaded["luasnip"] then + local ok, lazy = pcall(require, "lazy") + if ok then + lazy.load({ plugins = { "LuaSnip" } }) + end + end + end, + -- lade nur, wenn require("luasnip") wirklich klappt + cond = function() + return package.loaded["luasnip"] or pcall(require, "luasnip") + end, +} diff --git a/nvim-config/lua/plugins/haskell.lua b/nvim-config/lua/plugins/haskell.lua new file mode 100644 index 0000000..57a054b --- /dev/null +++ b/nvim-config/lua/plugins/haskell.lua @@ -0,0 +1,25 @@ +return { + "mrcjkb/haskell-tools.nvim", + ft = { "haskell", "lhaskell", "cabal" }, + opts = { + + hls = { + settings = { + haskell = { + formattingProvider = "fourmolu", + -- wir nutzen das interne Plugin, kein externes Binary nötig: + plugin = { fourmolu = { config = { external = false } } }, + + -- .cabal-Formatting komplett deaktivieren (sonst verlangt HLS cabal-fmt) + cabalFormattingProvider = "none", + }, + }, + }, + -- optional: Safety im on_attach + on_attach = function(client, bufnr) + if vim.bo[bufnr].filetype == "cabal" then + client.server_capabilities.documentFormattingProvider = false + end + end, + }, +} diff --git a/nvim-config/lua/plugins/snippets.lua b/nvim-config/lua/plugins/snippets.lua new file mode 100644 index 0000000..12101fd --- /dev/null +++ b/nvim-config/lua/plugins/snippets.lua @@ -0,0 +1,21 @@ +return { + "L3MON4D3/LuaSnip", + version = "v2.*", + lazy = false, -- früh laden + priority = 1000, -- vor anderem Zeug + dependencies = { "rafamadriz/friendly-snippets" }, + build = (function() + return (vim.fn.executable("make") == 1) and "make install_jsregexp" or nil + end)(), + config = function() + require("luasnip").config.set_config({ + history = true, + updateevents = "TextChanged,TextChangedI", + enable_autosnippets = true, + }) + require("luasnip.loaders.from_vscode").lazy_load() + require("luasnip.loaders.from_lua").lazy_load({ + paths = vim.fn.stdpath("config") .. "/lua/snippets", + }) + end, +} diff --git a/nvim-config/lua/plugins/test.lua b/nvim-config/lua/plugins/test.lua index bfd5ee4..bbb3c6d 100644 --- a/nvim-config/lua/plugins/test.lua +++ b/nvim-config/lua/plugins/test.lua @@ -1,5 +1,6 @@ return { - { "nvim-neotest/neotest-plenary", "nvim-neotest/neotest-jest" }, + "nvim-neotest/neotest-plenary", + "nvim-neotest/neotest-jest", { "nvim-neotest/neotest", opts = { diff --git a/scripts/install_latest_ge_proton.bash b/scripts/install_latest_ge_proton.bash new file mode 100755 index 0000000..7de00e4 --- /dev/null +++ b/scripts/install_latest_ge_proton.bash @@ -0,0 +1,36 @@ +#!/bin/bash +set -euo pipefail + +# make temp working directory +echo "Creating temporary working directory..." +rm -rf /tmp/proton-ge-custom +mkdir /tmp/proton-ge-custom +cd /tmp/proton-ge-custom + +# download tarball +echo "Fetching tarball URL..." +tarball_url=$(curl -s https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest | grep browser_download_url | cut -d\" -f4 | grep .tar.gz) +tarball_name=$(basename "$tarball_url") +echo "Downloading tarball: $tarball_name..." +curl -# -L "$tarball_url" -o "$tarball_name" --no-progress-meter + +# download checksum +echo "Fetching checksum URL..." +checksum_url=$(curl -s https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest | grep browser_download_url | cut -d\" -f4 | grep .sha512sum) +checksum_name=$(basename "$checksum_url") +echo "Downloading checksum: $checksum_name..." +curl -# -L "$checksum_url" -o "$checksum_name" --no-progress-meter + +# check tarball with checksum +echo "Verifying tarball $tarball_name with checksum $checksum_name..." +sha512sum -c "$checksum_name" +# if result is ok, continue + +# make steam directory if it does not exist +echo "Creating Steam directory if it does not exist..." +mkdir -p ~/.steam/steam/compatibilitytools.d + +# extract proton tarball to steam directory +echo "Extracting $tarball_name to Steam directory..." +tar -xf "$tarball_name" -C ~/.steam/steam/compatibilitytools.d/ +echo "All done :)"