Skip to content

Commit

Permalink
feat: add markview
Browse files Browse the repository at this point in the history
  • Loading branch information
fcying committed Oct 18, 2024
1 parent 4a07ca4 commit 88a7dd2
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 46 deletions.
1 change: 1 addition & 0 deletions lua/_lazy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ local plugins = {

-- filetype {{{
--{ 'kevinhwang91/nvim-bqf', ft = 'qf' },
{ import = "plugins.markview" },
{ "Vimjas/vim-python-pep8-indent", ft = "python" },
{ "wsdjeg/vim-autohotkey", ft = "autohotkey" },

Expand Down
12 changes: 12 additions & 0 deletions lua/plugins/markview.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
return {
"OXY2DEV/markview.nvim",
ft = "markdown",
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-tree/nvim-web-devicons"
},
opts = {
hybrid_modes = nil,
initial_state = false,
},
}
1 change: 0 additions & 1 deletion lua/plugins/todo-comments.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
return {
"folke/todo-comments.nvim",
-- event = "VeryLazy",
-- cmd = { "TodoTelescope", "TodoQuickFix", "TodoLocList" },
cmd = { "TodoTelescope" },
config = function()
Expand Down
2 changes: 1 addition & 1 deletion lua/plugins/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ return
parser_install_dir = parser_install_dir,
ensure_installed = {
"vim", "vimdoc", "lua", "query", "comment",
"cpp", "typescript", "vue"
"cpp", "typescript", "vue", "latex",
},
sync_install = #vim.api.nvim_list_uis() == 0,
auto_install = false,
Expand Down
75 changes: 31 additions & 44 deletions lua/plugins/whichkey.lua
Original file line number Diff line number Diff line change
@@ -1,52 +1,39 @@
local opts = {
icons = { mappings = false },
delay = function(ctx)
return ctx.plugin and 0 or 200
end,
plugins = {
presets = {
g = true,
z = true,
}
},
-- Start hidden and wait for a key to be pressed before showing the popup
-- Only used by enabled xo mapping modes.
---@param ctx { mode: string, operator: string }
defer = function(ctx)
return ctx.mode == "V" or ctx.mode == "<C-V>"
end,
replace = {
desc = {
{ "<Plug>%(?(.*)%)?", "%1" },
{ "^%+", "" },
{ "<[cC]md>", "" },
{ "<[cC][rR]>", "" },
{ "<[sS]ilent>", "" },
{ "^lua%s+", "" },
{ "^call%s+", "" },
{ "^:%s*", "" },
},
},
}
return {
"folke/which-key.nvim",
event = "VeryLazy",
config = function()
local wk = require("which-key")
wk.setup({
icons = { mappings = false },
delay = function(ctx)
return ctx.plugin and 0 or 200
end,
plugins = {
presets = {
g = true,
z = true,
}
},
-- Start hidden and wait for a key to be pressed before showing the popup
-- Only used by enabled xo mapping modes.
---@param ctx { mode: string, operator: string }
defer = function(ctx)
return ctx.mode == "V" or ctx.mode == "<C-V>"
end,
replace = {
key = {
function(key)
return require("which-key.view").format(key)
end,
-- { "<Space>", "SPC" },
},
desc = {
{ "<Plug>%(?(.*)%)?", "%1" },
{ "^%+", "" },
{ "<[cC]md>", "" },
{ "<[cC][rR]>", "" },
{ "<[sS]ilent>", "" },
{ "^lua%s+", "" },
{ "^call%s+", "" },
{ "^:%s*", "" },
},
},
triggers = {
{ "<leader>", mode = "nxso" },
{ "g", mode = "n" },
{ "f", mode = "n" },
{ "v", mode = "n" },
{ "[", mode = "nv" },
{ "]", mode = "nv" },
}
})
wk.setup(opts)
wk.add({
{ "<leader>c", group = "cd ..." },
{ "<leader>d", group = "delete ..." },
Expand Down

0 comments on commit 88a7dd2

Please sign in to comment.