Skip to content

Instantly share code, notes, and snippets.

@sidkang
Created October 13, 2023 10:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sidkang/7a0fb40d9499a5bb1a122c5aa935fb87 to your computer and use it in GitHub Desktop.
Save sidkang/7a0fb40d9499a5bb1a122c5aa935fb87 to your computer and use it in GitHub Desktop.
beancount cmp with nvim
return {
{
"hrsh7th/nvim-cmp",
dependencies = {
"crispgm/cmp-beancount",
"hrsh7th/cmp-nvim-lsp-signature-help",
},
opts = function(_, opts)
local cmp = require "cmp"
opts.sources = cmp.config.sources {
{ name = "nvim_lsp", priority = 1000 },
{ name = "luasnip", priority = 750 },
{ name = "buffer", priority = 500 },
{ name = "path", priority = 250 },
{ name = "nvim_lsp_signature_help", priority = 850 },
}
end,
config = function(_, opts)
local cmp = require "cmp"
cmp.setup(opts)
cmp.setup.filetype("beancount", {
sources = cmp.config.sources {
{ name = "luasnip", priority = 750 },
{
name = "beancount",
option = {
account = vim.fn.expand "$HOME/Developer/ledger/ledger.bean",
},
},
},
})
end,
},
}
python3_host_prog = vim.fn.expand("$PYENV_ROOT/versions/3.10.12/envs/py-service/bin/python3"),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment