Skip to content

Commit

Permalink
Merge from ayamir-main
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyWu20 committed Jul 27, 2023
2 parents e5f02c0 + 55d0bc7 commit 8a94272
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 22 deletions.
50 changes: 31 additions & 19 deletions lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"LuaSnip": {
"branch": "master",
"commit": "0b4950a237ce441a6a3a947d501622453f6860ea"
"commit": "e81cbe6004051c390721d8570a4a0541ceb0df10"
},
"accelerated-jk.nvim": {
"branch": "main",
Expand All @@ -29,7 +29,7 @@
},
"bufferline.nvim": {
"branch": "main",
"commit": "d24378edc14a675c820a303b4512af3bbc5761e9"
"commit": "99f0932365b34e22549ff58e1bea388465d15e99"
},
"catppuccin": {
"branch": "refactor/syntax-highlighting",
Expand All @@ -55,6 +55,10 @@
"branch": "main",
"commit": "f12408bdb54c39c23e67cab726264c10db33ada8"
},
"cmp-pandoc-references": {
"branch": "master",
"commit": "0f84af3682be2845775f811b82251edeadb8faf6"
},
"cmp-path": {
"branch": "main",
"commit": "91ff86cd9c29299a64f968ebb45846c485725f23"
Expand Down Expand Up @@ -109,39 +113,43 @@
},
"focus.nvim": {
"branch": "master",
"commit": "31f41d91b6b331faa07f0a513adcbc37087d028d"
"commit": "a994282f957840ee3419ad62a36be9d4e155560c"
},
"friendly-snippets": {
"branch": "main",
"commit": "4aed1a0ca605cb1c87f59799a0cc4afe00a40272"
"commit": "bc38057e513458cb2486b6cd82d365fa294ee398"
},
"fzy-lua-native": {
"branch": "master",
"commit": "820f745b7c442176bcc243e8f38ef4b985febfaf"
},
"gitsigns.nvim": {
"branch": "main",
"commit": "adcf2c7f2f495f5df148683764bf7cba6a70f34c"
"commit": "11b80e7eea249affc8776483272bcfc627b5552a"
},
"hop.nvim": {
"branch": "master",
"commit": "31e0e42e629bf16affea747132d9c54f55fb17c8"
"commit": "e41c04125fab05406be576640749352ad3eafcdb"
},
"indent-blankline.nvim": {
"branch": "master",
"commit": "4541d690816cb99a7fc248f1486aa87f3abce91c"
},
"knap": {
"branch": "main",
"commit": "503010f541696e99ed5c62f658620e546cebf8b0"
},
"lazy.nvim": {
"branch": "main",
"commit": "3ad55ae678876516156cca2f361c51f7952a924b"
},
"lsp_signature.nvim": {
"branch": "master",
"commit": "b36080555e393402bc9484ce0e60d8b6cd23d426"
"commit": "58d4e810801da74c29313da86075d6aea537501f"
},
"lspsaga.nvim": {
"branch": "main",
"commit": "d3ac8b98f207ef355ab968726996702f7ce41b99"
"commit": "23a481f0b142f4498e2fc2dd80e7a404079833e6"
},
"lualine.nvim": {
"branch": "master",
Expand All @@ -165,7 +173,7 @@
},
"mason.nvim": {
"branch": "main",
"commit": "3f6b544c75c01549f7a2a9e395e0f1cea42b25dd"
"commit": "fe9e34a9ab4d64321cdc3ecab4ea1809239bb73f"
},
"neodim": {
"branch": "master",
Expand Down Expand Up @@ -197,23 +205,23 @@
},
"nvim-dap": {
"branch": "master",
"commit": "d17d1bba23ec72a157bd183c57840c39e323f515"
"commit": "0a02ed103e4da1928dc88428248dec7bb5ee6f34"
},
"nvim-dap-ui": {
"branch": "master",
"commit": "85b16ac2309d85c88577cd8ee1733ce52be8227e"
},
"nvim-lspconfig": {
"branch": "master",
"commit": "dd11ba7b3c8f82d51b6d4dd7d68fce2d78bf78a0"
"commit": "b6091272422bb0fbd729f7f5d17a56d37499c54f"
},
"nvim-notify": {
"branch": "master",
"commit": "ea9c8ce7a37f2238f934e087c255758659948e0f"
},
"nvim-scrollview": {
"branch": "main",
"commit": "c0dc4822e0b87d10569c55d7189c6147ad03538b"
"commit": "dc236a2e6503f46598554d0955fe897dbcfa4807"
},
"nvim-tree.lua": {
"branch": "master",
Expand All @@ -225,15 +233,15 @@
},
"nvim-treesitter": {
"branch": "master",
"commit": "7b04e8b67eec7d92daadf9f0717dd272ddfc81a3"
"commit": "736a672afe852dbad4199002c89b7461b285c47f"
},
"nvim-treesitter-context": {
"branch": "master",
"commit": "6f8f788738b968f24a108ee599c5be0031f94f06"
},
"nvim-treesitter-textobjects": {
"branch": "master",
"commit": "ef32a5c24b767d165ed63fd2b24ac8dc52742521"
"commit": "9e519b6146512c8e2e702faf8ac48420f4f5deec"
},
"nvim-ts-autotag": {
"branch": "main",
Expand All @@ -249,15 +257,15 @@
},
"obsidian.nvim": {
"branch": "main",
"commit": "1982447bd8481bf5b8e6e033519d54feb77a4e41"
"commit": "1534187b4e3eee40053918388460c739d2b76da4"
},
"paint.nvim": {
"branch": "main",
"commit": "6ce64212804f425073c61ab0d9c2b034f0435260"
},
"persisted.nvim": {
"branch": "main",
"commit": "b03c863731eafacd973912383297ea5d8fdb006a"
"commit": "c1c4bbff8a4e9b9f66812b2daa9d3338916e8da2"
},
"plenary.nvim": {
"branch": "master",
Expand All @@ -281,7 +289,7 @@
},
"sniprun": {
"branch": "master",
"commit": "4762952f3d206d41eedb789e10741de75d1391a3"
"commit": "6f9025bf475799bc0fbe8b338b3912f4a701ff81"
},
"specs.nvim": {
"branch": "main",
Expand All @@ -299,6 +307,10 @@
"branch": "master",
"commit": "0d275c8d25f32457e67b5c66d6ae43f26a61bce5"
},
"telescope-bibtex.nvim": {
"branch": "master",
"commit": "0b01f5c457f208ff2e12ce4dae89a61eec1ed69d"
},
"telescope-frecency.nvim": {
"branch": "master",
"commit": "62d3381a32ae541233b03a129ece0aeced30ad5e"
Expand Down Expand Up @@ -329,7 +341,7 @@
},
"trouble.nvim": {
"branch": "main",
"commit": "0e6703c1d37d2d34ed029ab54f9bd66e3f2ecbf7"
"commit": "fc4bb22b1d2cd5eb46fe61a9f6d6416d742beb5c"
},
"vim-cool": {
"branch": "master",
Expand Down Expand Up @@ -361,7 +373,7 @@
},
"vimtex": {
"branch": "master",
"commit": "5e50cc0e96e8a8ffc6fd10d627d65b8d1354b5da"
"commit": "877de3ba5de5f766e5bfa1c3fb0d2ecfcd18f868"
},
"which-key.nvim": {
"branch": "main",
Expand Down
4 changes: 4 additions & 0 deletions lua/keymap/tool.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ local plug_map = {
:with_noremap()
:with_silent()
:with_desc("ui: Change colorscheme for current session"),
["n|<leader>fC"] = map_cu("Telescope bibtex")
:with_noremap()
:with_silent()
:with_desc("cite: Insert citation from bibtex"),
["n|<leader>fn"] = map_cu(":enew"):with_noremap():with_silent():with_desc("buffer: New"),
["n|<leader>fg"] = map_cu("Telescope git_files")
:with_noremap()
Expand Down
2 changes: 2 additions & 0 deletions lua/modules/configs/completion/cmp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ return function()
treesitter = "[TS]",
luasnip = "[SNIP]",
spell = "[SPELL]",
pandoc_references = "[PANDOC]",
}, {
__index = function()
return "[BTN]" -- builtin/unknown source names
Expand Down Expand Up @@ -153,6 +154,7 @@ return function()
{ name = "buffer" },
{ name = "latex_symbols" },
{ name = "copilot" },
{ name = "pandoc_references" },
-- { name = "codeium" },
-- { name = "cmp_tabnine" },
},
Expand Down
2 changes: 1 addition & 1 deletion lua/modules/configs/editor/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ return vim.schedule_wrap(function()
local ok, is_large_file = pcall(vim.api.nvim_buf_get_var, bufnr, "bigfile_disable_treesitter")
return ok and is_large_file
end,
additional_vim_regex_highlighting = { "c", "cpp" },
additional_vim_regex_highlighting = { "c", "cpp", "markdown" },
},
textobjects = {
select = {
Expand Down
45 changes: 43 additions & 2 deletions lua/modules/configs/tool/obsidian.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
return function(_, opts)
require("obsidian").setup(opts)
return function()
require("obsidian").setup({
dir = "/Users/tonywu/Library/Mobile Documents/com~apple~CloudDocs/MPhil/Work/Final_thesis",
completion = {
-- If using nvim-cmp, otherwise set to false
nvim_cmp = true,
-- Trigger completion at 2 chars
min_chars = 2,
-- Where to put new notes created from completion. Valid options are
-- * "current_dir" - put new notes in same directory as the current buffer.
-- * "notes_subdir" - put new notes in the default notes subdirectory.
new_notes_location = "current_dir",
prepend_note_id = false,
},
note_id_func = function(title)
-- Create note IDs in a Zettelkasten format with a timestamp and a suffix.
-- In this case a note with the title 'My new note' will given an ID that looks
-- like '1657296016-my-new-note', and therefore the file name '1657296016-my-new-note.md'
local suffix = ""
if title ~= nil then
-- If title is given, transform it into valid file name.
suffix = title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower()
else
-- If title is nil, just add 4 random uppercase letters to the suffix.
for _ = 1, 4 do
suffix = suffix .. string.char(math.random(65, 90))
end
end
return tostring(os.time()) .. "-" .. suffix
end,
note_frontmatter_func = function(note)
-- This is equivalent to the default frontmatter function.
local out = { id = note.id, aliases = note.aliases, tags = note.tags, todos = note.todos }
-- `note.metadata` contains any manually added fields in the frontmatter.
-- So here we just make sure those fields are kept in the frontmatter.
if note.metadata ~= nil and require("obsidian").util.table_length(note.metadata) > 0 then
for k, v in pairs(note.metadata) do
out[k] = v
end
end
return out
end,
})
end
1 change: 1 addition & 0 deletions lua/modules/configs/tool/telescope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,5 @@ return function()
require("telescope").load_extension("undo")
require("telescope").load_extension("zoxide")
require("telescope").load_extension("persisted")
require("telescope").load_extension("bibtex")
end
1 change: 1 addition & 0 deletions lua/modules/plugins/completion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ completion["hrsh7th/nvim-cmp"] = {
{ "hrsh7th/cmp-buffer" },
{ "kdheepak/cmp-latex-symbols" },
{ "ray-x/cmp-treesitter", commit = "c8e3a74" },
{ "TonyWu20/cmp-pandoc-references" },
-- { "tzachar/cmp-tabnine", build = "./install.sh", config = require("completion.tabnine") },
-- {
-- "jcdickinson/codeium.nvim",
Expand Down
1 change: 1 addition & 0 deletions lua/modules/plugins/tool.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ tool["nvim-telescope/telescope.nvim"] = {
} },
{ "jvgrootveld/telescope-zoxide" },
{ "nvim-telescope/telescope-live-grep-args.nvim" },
{ "nvim-telescope/telescope-bibtex.nvim" },
},
}

Expand Down

0 comments on commit 8a94272

Please sign in to comment.