1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

Compare commits

...

3 Commits

Author SHA1 Message Date
jdhao
fe95658319 Add colorscheme arctic.nvim 2024-08-05 06:25:28 +08:00
jdhao
e165276763 fix error when there is no cursor word 2024-08-05 06:23:18 +08:00
jdhao
933b887281 update config for nvim-ufo 2024-08-05 05:50:45 +08:00
4 changed files with 27 additions and 6 deletions

View File

@ -56,6 +56,9 @@ M.colorscheme_conf = {
vim.g.material_style = "oceanic"
vim.cmd('colorscheme material')
end,
arctic = function ()
vim.cmd("colorscheme arctic")
end
}
--- Use a random colorscheme from the pre-defined list of colorschemes.

View File

@ -35,14 +35,28 @@ keymap.set("n", "N", "", {
end,
})
local no_word_under_cursor = function()
local word_under_cursor = vim.fn.expand("<cword>")
local msg = "E348: No string under cursor"
api.nvim_err_writeln(msg)
return word_under_cursor == ""
end
keymap.set("n", "*", "", {
callback = function()
if no_word_under_cursor() then
return
end
vim.fn.execute("normal! *N")
hlslens.start()
end,
})
keymap.set("n", "#", "", {
callback = function()
if no_word_under_cursor() then
return
end
vim.fn.execute("normal! #N")
hlslens.start()
end,

View File

@ -40,9 +40,7 @@ vim.keymap.set("n", "zR", require("ufo").openAllFolds)
vim.keymap.set("n", "zM", require("ufo").closeAllFolds)
vim.keymap.set("n", "zr", require("ufo").openFoldsExceptKinds)
vim.keymap.set("n", "<leader>K", function()
local winid = require("ufo").peekFoldedLinesUnderCursor()
if not winid then
-- vim.lsp.buf.hover()
vim.cmd([[ Lspsaga hover_doc ]])
end
end)
local _ = require("ufo").peekFoldedLinesUnderCursor()
end, {
desc = "Preview folded maps",
})

View File

@ -142,6 +142,12 @@ local plugin_specs = {
{ "catppuccin/nvim", name = "catppuccin", lazy = true },
{ "olimorris/onedarkpro.nvim", lazy = true },
{ "marko-cerovac/material.nvim", lazy = true },
{
"rockyzhang24/arctic.nvim",
dependencies = { "rktjmp/lush.nvim" },
name = "arctic",
branch = "v2",
},
{ "nvim-tree/nvim-web-devicons", event = "VeryLazy" },