summaryrefslogtreecommitdiff
path: root/public/nvim/.nvim
diff options
context:
space:
mode:
Diffstat (limited to 'public/nvim/.nvim')
-rw-r--r--public/nvim/.nvim/lua/plugins/lang/ledger.lua25
-rw-r--r--public/nvim/.nvim/lua/plugins/lsp/cmp.lua2
2 files changed, 27 insertions, 0 deletions
diff --git a/public/nvim/.nvim/lua/plugins/lang/ledger.lua b/public/nvim/.nvim/lua/plugins/lang/ledger.lua
new file mode 100644
index 0000000..bc265e1
--- /dev/null
+++ b/public/nvim/.nvim/lua/plugins/lang/ledger.lua
@@ -0,0 +1,25 @@
+return {
+ {
+ "nvim-treesitter/nvim-treesitter",
+ opts = function(_, opts)
+ if type(opts) == "table" then
+ opts.ensure_installed = opts.ensure_installed or {}
+ vim.list_extend(opts.ensure_installed, { "ledger" })
+ end
+ end,
+ },
+ {
+ "ledger/vim-ledger",
+ ft = { "ldg", "ledger", "journal" },
+ },
+ -- TODO
+ --{
+ --"hrsh7th/nvim-cmp",
+ --opts = function(_, opts)
+ --if type(opts) == "table" then
+ --opts.sources = opts.sources or {}
+ --vim.list_extend(opts.sources, { name = "ledger" })
+ --end
+ --end,
+ --},
+}
diff --git a/public/nvim/.nvim/lua/plugins/lsp/cmp.lua b/public/nvim/.nvim/lua/plugins/lsp/cmp.lua
index 6099683..004c265 100644
--- a/public/nvim/.nvim/lua/plugins/lsp/cmp.lua
+++ b/public/nvim/.nvim/lua/plugins/lsp/cmp.lua
@@ -2,6 +2,7 @@ return {
"hrsh7th/nvim-cmp",
opts = {
sources = {
+ { name = "ledger" },
{
name = "luasnip",
option = {
@@ -91,5 +92,6 @@ return {
{ "hrsh7th/cmp-path" },
{ "onsails/lspkind.nvim" },
{ "saadparwaiz1/cmp_luasnip" },
+ { "someone-stole-my-name/cmp-ledger" },
},
}