From 0bc6a46465dd185897fff3f0ed4724a319f3de15 Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Tue, 14 Jul 2026 13:30:28 +0100 Subject: [PATCH] Fixed minor errors in config --- devenv.nix | 2 ++ init.lua | 2 ++ lua/config/utils.lua | 8 ++++++++ lua/plugins/lsp.lua | 5 ++++- 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/devenv.nix b/devenv.nix index 2fbcb80..f562fd2 100644 --- a/devenv.nix +++ b/devenv.nix @@ -61,6 +61,8 @@ }; languages.lua.enable = true; + languages.python.enable = true; + git-hooks.hooks = { selene.enable = true; diff --git a/init.lua b/init.lua index 196f784..aecbdac 100644 --- a/init.lua +++ b/init.lua @@ -10,6 +10,8 @@ local utils = require("config.utils") local lazypath = utils.ensure_plugin("lazy.nvim", "folke/lazy.nvim", "stable") local hotpotpath = utils.ensure_plugin("hotpot.nvim", "rktjmp/hotpot.nvim") +utils.clean_conflicting_parsers() + ---@diagnostic disable: undefined-field vim.opt.rtp:prepend(hotpotpath) vim.opt.rtp:prepend(lazypath) diff --git a/lua/config/utils.lua b/lua/config/utils.lua index 9f1415c..c1f5f74 100644 --- a/lua/config/utils.lua +++ b/lua/config/utils.lua @@ -19,4 +19,12 @@ function M.ensure_plugin(name, repo, branch) return path end +-- Helper function to clean up duplicate parsers that conflict with Nix-provided ones +function M.clean_conflicting_parsers() + local org_parser_lazy = vim.fn.stdpath("data") .. "/lazy/orgmode/parser/org.so" + if (vim.uv or vim.loop).fs_stat(org_parser_lazy) then + os.remove(org_parser_lazy) + end +end + return M diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 70ba839..8830da6 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -42,10 +42,13 @@ return { "ruff", "pylsp", "taplo", - "nixd", }, }) + if vim.fn.executable("nixd") == 1 then + vim.lsp.enable("nixd") + end + vim.lsp.config("lua_ls", { settings = { Lua = {