Created
October 13, 2023 10:30
-
-
Save sidkang/7a0fb40d9499a5bb1a122c5aa935fb87 to your computer and use it in GitHub Desktop.
beancount cmp with nvim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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