diff --git a/nvim/.config/nvim/lua/plugins/completion.lua b/nvim/.config/nvim/lua/plugins/completion.lua index 6d38c40..4c75211 100644 --- a/nvim/.config/nvim/lua/plugins/completion.lua +++ b/nvim/.config/nvim/lua/plugins/completion.lua @@ -1,3 +1,5 @@ +local is_available = require("core.util").is_available + local completion_engine = { { "hrsh7th/nvim-cmp", @@ -178,11 +180,12 @@ local snippet_engine = { "benfowler/telescope-luasnip.nvim", dependencies = { { "nvim-telescope/telescope.nvim", optional = true } }, config = function() - if require("core.util").is_available("telescope") then + if is_available("telescope") then require("telescope").load_extension("luasnip") end end, }, + { "hrsh7th/nvim-cmp", optional = true }, }, event = { "InsertEnter" }, build = "make install_jsregexp", @@ -237,15 +240,10 @@ local beancount_cmp = { }, ft = "beancount", opts = function(_, opts) - vim.g.python3_host_prog = "/home/marty/.local/pipx/venvs/beancount/bin/python" + -- FIXME: Find a way to dynamically derive environment + vim.g.python3_host_prog = os.getenv("HOME") .. "/.local/pipx/venvs/beancount/bin/python" table.insert(opts.sources, { name = "beancount", - -- option = { - -- -- TODO: implement dynamically - -- -- I believe if we don't supply this it automatically takes - -- -- from the open file which would be good enough - -- account = "/home/marty/documents/records/budget/main.beancount", - -- }, }) end, }