mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
feat(nvim): Add support for which key
This commit is contained in:
parent
9b90b02442
commit
1b2fc3015b
21 changed files with 276 additions and 206 deletions
|
|
@ -15,7 +15,7 @@ return {
|
|||
-- require('hover.providers.jira')
|
||||
-- require('hover.providers.dap')
|
||||
-- require('hover.providers.fold_preview')
|
||||
-- require('hover.providers.diagnostic')
|
||||
require("hover.providers.diagnostic")
|
||||
-- require('hover.providers.man')
|
||||
-- require('hover.providers.dictionary')
|
||||
end,
|
||||
|
|
@ -46,4 +46,10 @@ return {
|
|||
vim.o.mousemoveevent = true
|
||||
end,
|
||||
},
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function()
|
||||
require("gitsigns").setup()
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,2 @@
|
|||
-- Entry point of the plugin manager
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
{ import = "plugins.appearance" },
|
||||
{ import = "plugins.completion" },
|
||||
{ import = "plugins.fileutils" },
|
||||
{ import = "plugins.lsp" },
|
||||
{ import = "plugins.syntax" },
|
||||
{ import = "plugins.misc" },
|
||||
})
|
||||
require("plugins.lazy-nvim")
|
||||
|
|
|
|||
39
tools/nvim/lua/plugins/lazy-nvim.lua
Normal file
39
tools/nvim/lua/plugins/lazy-nvim.lua
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- import your plugins
|
||||
{ import = "plugins.appearance" },
|
||||
{ import = "plugins.completion" },
|
||||
{ import = "plugins.fileutils" },
|
||||
{ import = "plugins.lsp" },
|
||||
{ import = "plugins.syntax" },
|
||||
{ import = "plugins.misc" },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
})
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
return {
|
||||
{ import = "plugins.mod.lspconfig" },
|
||||
{
|
||||
"NoahTheDuke/vim-just",
|
||||
ft = { "just" },
|
||||
"neovim/nvim-lspconfig",
|
||||
lazy = false,
|
||||
},
|
||||
{ import = "plugins.mod.render-markdown" },
|
||||
-- { import = "plugins.mod.markview" },
|
||||
|
|
@ -63,4 +62,8 @@ return {
|
|||
},
|
||||
{ import = "plugins.mod.conform-nvim" },
|
||||
{ "nvim-treesitter/nvim-treesitter-context" },
|
||||
{
|
||||
"NoahTheDuke/vim-just",
|
||||
ft = { "just" },
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,25 +7,7 @@ return {
|
|||
} },
|
||||
{ "CRAG666/code_runner.nvim", config = true },
|
||||
{ import = "plugins.mod.obsidian-nvim" },
|
||||
{
|
||||
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>?",
|
||||
function()
|
||||
require("which-key").show({ global = false })
|
||||
end,
|
||||
desc = "Buffer Local Keymaps (which-key)",
|
||||
},
|
||||
},
|
||||
},
|
||||
{ import = "plugins.mod.which-keys-nvim" },
|
||||
{
|
||||
"github/copilot.vim",
|
||||
lazy = false,
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ ins_left({
|
|||
ins_left({
|
||||
-- mode component
|
||||
function()
|
||||
return ""
|
||||
return ""
|
||||
end,
|
||||
color = function()
|
||||
-- auto change color according to neovims mode
|
||||
|
|
|
|||
18
tools/nvim/lua/plugins/mod/which-keys-nvim.lua
Normal file
18
tools/nvim/lua/plugins/mod/which-keys-nvim.lua
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
return {
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>?",
|
||||
function()
|
||||
require("which-key").show({ global = false })
|
||||
end,
|
||||
desc = "Buffer Local Keymaps (which-key)",
|
||||
},
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue