forked from ayamir/nvimdots
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from TonyWu20/ayamir-main
ayamir main
- Loading branch information
Showing
26 changed files
with
284 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,19 @@ | ||
if not vim.g.vscode then | ||
require("core") | ||
print(vim.fn.expand("%")) | ||
-- Release note | ||
vim.schedule(function() | ||
vim.notify_once( | ||
[[ | ||
We've released version v3.0.0! | ||
Visit https://github.com/ayamir/nvimdots/releases to see the release notes. | ||
If you have icons that can't be rendered correctly (e.g., 𑨩 and � ) or icons with incorrect size, be sure to read this! | ||
To silence this message, remove it from `init.lua` at the config's root directory. | ||
To check the glyphs size, make sure the following icons are very close to the crosses but there is no overlap: | ||
XXXXXXXXX | ||
]], | ||
vim.log.levels.WARN | ||
) | ||
end) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,39 @@ | ||
local bind = require("keymap.bind") | ||
local map_cr = bind.map_cr | ||
local map_cu = bind.map_cu | ||
-- local map_cmd = bind.map_cmd | ||
local map_cmd = bind.map_cmd | ||
local map_callback = bind.map_callback | ||
|
||
local plug_map = { | ||
-- LSP-related keymaps, work only when event = { "InsertEnter", "LspStart" } | ||
["n|<leader>li"] = map_cr("LspInfo"):with_noremap():with_silent():with_nowait():with_desc("lsp: Info"), | ||
["n|<leader>lr"] = map_cr("LspRestart"):with_noremap():with_silent():with_nowait():with_desc("lsp: Restart"), | ||
["n|go"] = map_cr("Lspsaga outline"):with_noremap():with_silent():with_desc("lsp: Toggle outline"), | ||
["n|g["] = map_cr("Lspsaga diagnostic_jump_prev"):with_noremap():with_silent():with_desc("lsp: Prev diagnostic"), | ||
["n|g]"] = map_cr("Lspsaga diagnostic_jump_next"):with_noremap():with_silent():with_desc("lsp: Next diagnostic"), | ||
["n|<leader>ld"] = map_cr("Lspsaga show_line_diagnostics") | ||
:with_noremap() | ||
:with_silent() | ||
:with_desc("lsp: Line diagnostic"), | ||
["n|gs"] = map_callback(function() | ||
vim.lsp.buf.signature_help() | ||
end) | ||
:with_noremap() | ||
:with_silent() | ||
:with_desc("lsp: Signature help"), | ||
["n|gr"] = map_cr("Lspsaga rename"):with_noremap():with_silent():with_desc("lsp: Rename in file range"), | ||
["n|gR"] = map_cr("Lspsaga rename ++project") | ||
:with_noremap() | ||
:with_silent() | ||
:with_desc("lsp: Rename in project range"), | ||
["n|K"] = map_cr("Lspsaga hover_doc"):with_noremap():with_silent():with_desc("lsp: Show doc"), | ||
["nv|ga"] = map_cr("Lspsaga code_action"):with_noremap():with_silent():with_desc("lsp: Code action"), | ||
["n|gd"] = map_cr("Lspsaga peek_definition"):with_noremap():with_silent():with_desc("lsp: Preview definition"), | ||
["n|gD"] = map_cr("Lspsaga goto_definition"):with_noremap():with_silent():with_desc("lsp: Goto definition"), | ||
["n|gh"] = map_cr("Lspsaga lsp_finder"):with_noremap():with_silent():with_desc("lsp: Show reference"), | ||
["n|<leader>ci"] = map_cr("Lspsaga incoming_calls") | ||
:with_noremap() | ||
:with_silent() | ||
:with_desc("lsp: Show incoming calls"), | ||
["n|<leader>co"] = map_cr("Lspsaga outgoing_calls") | ||
:with_noremap() | ||
:with_silent() | ||
:with_desc("lsp: Show outgoing calls"), | ||
["n|<A-f>"] = map_cmd("<Cmd>FormatToggle<CR>"):with_noremap():with_desc("Formater: Toggle format on save"), | ||
} | ||
|
||
bind.nvim_load_mapping(plug_map) | ||
|
||
local mapping = {} | ||
|
||
function mapping.lsp(buf) | ||
local map = { | ||
-- LSP-related keymaps, work only when event = { "InsertEnter", "LspStart" } | ||
["n|<leader>li"] = map_cr("LspInfo"):with_buffer(buf):with_desc("lsp: Info"), | ||
["n|<leader>lr"] = map_cr("LspRestart"):with_buffer(buf):with_nowait():with_desc("lsp: Restart"), | ||
["n|go"] = map_cr("Lspsaga outline"):with_buffer(buf):with_desc("lsp: Toggle outline"), | ||
["n|g["] = map_cr("Lspsaga diagnostic_jump_prev"):with_buffer(buf):with_desc("lsp: Prev diagnostic"), | ||
["n|g]"] = map_cr("Lspsaga diagnostic_jump_next"):with_buffer(buf):with_desc("lsp: Next diagnostic"), | ||
["n|<leader>ld"] = map_cr("Lspsaga show_line_diagnostics"):with_buffer(buf):with_desc("lsp: Line diagnostic"), | ||
["n|gs"] = map_callback(function() | ||
vim.lsp.buf.signature_help() | ||
end):with_desc("lsp: Signature help"), | ||
["n|gr"] = map_cr("Lspsaga rename"):with_buffer(buf):with_desc("lsp: Rename in file range"), | ||
["n|gR"] = map_cr("Lspsaga rename ++project"):with_buffer(buf):with_desc("lsp: Rename in project range"), | ||
["n|K"] = map_cr("Lspsaga hover_doc"):with_buffer(buf):with_desc("lsp: Show doc"), | ||
["nv|ga"] = map_cr("Lspsaga code_action"):with_buffer(buf):with_desc("lsp: Code action for cursor"), | ||
["n|gd"] = map_cr("Lspsaga peek_definition"):with_buffer(buf):with_desc("lsp: Preview definition"), | ||
["n|gD"] = map_cr("Lspsaga goto_definition"):with_buffer(buf):with_desc("lsp: Goto definition"), | ||
["n|gh"] = map_cr("Lspsaga lsp_finder"):with_buffer(buf):with_desc("lsp: Show reference"), | ||
["n|<leader>ci"] = map_cr("Lspsaga incoming_calls"):with_buffer(buf):with_desc("lsp: Show incoming calls"), | ||
["n|<leader>co"] = map_cr("Lspsaga outgoing_calls"):with_buffer(buf):with_desc("lsp: Show outgoing calls"), | ||
} | ||
bind.nvim_load_mapping(map) | ||
end | ||
|
||
return mapping |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.