Skip to content

Commit

Permalink
Merge pull request #24 from TonyWu20/ayamir-main
Browse files Browse the repository at this point in the history
ayamir main
  • Loading branch information
TonyWu20 authored Jul 28, 2023
2 parents 5d9be65 + f779d5d commit e97225b
Show file tree
Hide file tree
Showing 18 changed files with 465 additions and 170 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ jobs:
- uses: actions/checkout@v3
- uses: lunarmodules/luacheck@v1
with:
args: . --std luajit --globals vim _toggle_lazygit _command_panel --max-line-length 150 --no-config
args: . --std luajit --globals vim _toggle_lazygit _command_panel _debugging --max-line-length 150 --no-config
22 changes: 11 additions & 11 deletions lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
},
"gitsigns.nvim": {
"branch": "main",
"commit": "11b80e7eea249affc8776483272bcfc627b5552a"
"commit": "5d73da785a3c05fd63ac31769079db05169a6ec7"
},
"hop.nvim": {
"branch": "master",
Expand All @@ -145,11 +145,11 @@
},
"lsp_signature.nvim": {
"branch": "master",
"commit": "58d4e810801da74c29313da86075d6aea537501f"
"commit": "04f0c52c6a04680f29bdecb5b2943591b8c0ff43"
},
"lspsaga.nvim": {
"branch": "main",
"commit": "23a481f0b142f4498e2fc2dd80e7a404079833e6"
"commit": "557e6fd7fbca325a4bea582576fe36bec903367c"
},
"lualine.nvim": {
"branch": "master",
Expand Down Expand Up @@ -205,7 +205,7 @@
},
"nvim-dap": {
"branch": "master",
"commit": "0a02ed103e4da1928dc88428248dec7bb5ee6f34"
"commit": "2f28ea843bcdb378b171a66ddcd568516e431d55"
},
"nvim-dap-ui": {
"branch": "master",
Expand Down Expand Up @@ -233,7 +233,7 @@
},
"nvim-treesitter": {
"branch": "master",
"commit": "736a672afe852dbad4199002c89b7461b285c47f"
"commit": "6aababfca4e3d72cb1e8fbbdac4115a5f88107d0"
},
"nvim-treesitter-context": {
"branch": "master",
Expand All @@ -249,15 +249,15 @@
},
"nvim-ts-context-commentstring": {
"branch": "main",
"commit": "7f625207f225eea97ef7a6abe7611e556c396d2f"
"commit": "e9062e2dfb9854e6a927370f2d720de354c88524"
},
"nvim-web-devicons": {
"branch": "master",
"commit": "efbfed0567ef4bfac3ce630524a0f6c8451c5534"
},
"obsidian.nvim": {
"branch": "main",
"commit": "1534187b4e3eee40053918388460c739d2b76da4"
"commit": "ed7ace4823a57eeea1d296e86861c57eefe292bb"
},
"paint.nvim": {
"branch": "main",
Expand All @@ -277,7 +277,7 @@
},
"rainbow-delimiters.nvim": {
"branch": "master",
"commit": "5db37600becf689d78dbf066545b0de4d6f0ab94"
"commit": "ec7ade261f961a5299a13451aa18a4dce630d0b3"
},
"rust-tools.nvim": {
"branch": "master",
Expand All @@ -289,7 +289,7 @@
},
"sniprun": {
"branch": "master",
"commit": "6f9025bf475799bc0fbe8b338b3912f4a701ff81"
"commit": "1f698c5d26afa356f548d4be5a0deb389d0bb387"
},
"specs.nvim": {
"branch": "main",
Expand Down Expand Up @@ -333,7 +333,7 @@
},
"telescope.nvim": {
"branch": "master",
"commit": "1228f3b15ca3d9b95dcb92efda6a3448871030bd"
"commit": "22735947d84d78f29436c203f0a4b8dc15dda204"
},
"toggleterm.nvim": {
"branch": "main",
Expand Down Expand Up @@ -365,7 +365,7 @@
},
"vim-matchup": {
"branch": "master",
"commit": "ca8971739e3908973c5912cb3a0ffb6cf7bd83e7"
"commit": "0646093e07b1f89b16536cfb3dc4993e3f0ac653"
},
"vim-pencil": {
"branch": "master",
Expand Down
2 changes: 1 addition & 1 deletion lua/core/event.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ end

local mapping = require("keymap.completion")
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
group = vim.api.nvim_create_augroup("LspKeymapLoader", { clear = true }),
callback = function(event)
mapping.lsp(event.buf)
end,
Expand Down
1 change: 0 additions & 1 deletion lua/keymap/tool.lua
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ local plug_map = {
:with_desc("debug: Run/Continue"),
["n|<F7>"] = map_callback(function()
require("dap").terminate()
require("dapui").close()
end)
:with_noremap()
:with_silent()
Expand Down
160 changes: 95 additions & 65 deletions lua/modules/configs/completion/lspsaga.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,38 +26,31 @@ return function()
set_sidebar_icons()

require("lspsaga").setup({
scroll_preview = {
scroll_down = "<C-j>",
scroll_up = "<C-k>",
-- Breadcrumbs: https://dev.neovim.pro/lspsaga/breadcrumbs/
symbol_in_winbar = {
enable = true,
separator = " " .. icons.ui.Separator,
hide_keyword = false,
show_file = false,
folder_level = 1,
color_mode = true,
delay = 100,
},
request_timeout = 3000,
finder = {
silent = true,
default = "def+ref+imp",
-- https://dev.neovim.pro/lspsaga/callhierarchy/
callhierarchy = {
layout = "float",
filter = {},
keys = {
shuttle = "[]",
toggle_or_open = "<CR>",
jump_to = "e",
edit = "e",
vsplit = "v",
split = "s",
tabe = "t",
tabnew = "n",
quit = "q",
shuttle = "[]",
toggle_or_req = "u",
close = "<Esc>",
},
},
definition = {
keys = {
edit = "<C-c>o",
vsplit = "<C-c>v",
split = "<C-c>s",
tabe = "<C-c>t",
close = "<C-c>q",
quit = "q",
},
},
-- https://dev.neovim.pro/lspsaga/codeaction/
code_action = {
num_shortcut = true,
show_server_name = true,
Expand All @@ -67,95 +60,127 @@ return function()
exec = "<CR>",
},
},
lightbulb = {
enable = false,
sign = true,
sign_priority = 20,
virtual_text = false,
-- https://dev.neovim.pro/lspsaga/definition/
definition = {
width = 0.6,
height = 0.5,
keys = {
edit = "<C-c>o",
vsplit = "<C-c>v",
split = "<C-c>s",
tabe = "<C-c>t",
quit = "q",
close = "<C-c>q",
},
},
-- https://dev.neovim.pro/lspsaga/diagnostic/
diagnostic = {
show_code_action = true,
jump_num_shortcut = true,
max_width = 0.5,
max_height = 0.6,
text_hl_follow = true,
show_code_action = true,
border_follow = true,
diagnostic_only_current = false,
extend_relatedInformation = false,
jump_num_shortcut = true,
extend_relatedInformation = true,
show_layout = "float",
show_normal_height = 10,
max_show_width = 0.9,
max_show_height = 0.6,
diagnostic_only_current = false,
keys = {
exec_action = "r",
quit = "q",
toggle_or_jump = "<CR>",
quit_in_show = { "q", "<Esc>" },
},
},
rename = {
in_select = false,
auto_save = false,
-- https://dev.neovim.pro/lspsaga/finder/
finder = {
max_height = 0.5,
left_width = 0.3,
right_width = 0.3,
default = "def+ref+imp",
methods = {},
layout = "float",
filter = {},
silent = false,
keys = {
quit = "<C-c>",
select = "x",
exec = "<CR>",
shuttle = "[]",
toggle_or_open = "<CR>",
vsplit = "v",
split = "s",
tabe = "t",
tabnew = "n",
quit = "q",
close = "<Esc>",
},
},
-- https://dev.neovim.pro/lspsaga/hover/
hover = {
max_width = 0.3,
max_height = 0.7,
open_link = "gl",
open_browser = "silent !" .. require("core.settings").external_browser,
open_cmd = "silent !" .. require("core.settings").external_browser,
},
-- https://dev.neovim.pro/lspsaga/implement/
implement = {
enable = true,
sign = true,
virtual_text = false,
priority = 100,
},
-- https://dev.neovim.pro/lspsaga/lightbulb/
lightbulb = {
enable = false,
sign = true,
virtual_text = false,
debounce = 10,
sign_priority = 20,
},
-- https://dev.neovim.pro/lspsaga/outline/
outline = {
win_position = "right",
win_width = 30,
auto_preview = false,
detail = false,
auto_close = true,
close_after_jump = true,
detail = false,
layout = "normal",
max_height = 0.5,
left_width = 0.3,
keys = {
toggle_or_jump = "<CR>",
jump = "o",
quit = "q",
jump = "o",
},
},
symbol_in_winbar = {
enable = true,
separator = " " .. icons.ui.Separator,
hide_keyword = false,
show_file = false,
color_mode = true,
},
implement = {
enable = true,
sign = true,
virtual_text = false,
},
callhierarchy = {
layout = "float",
-- https://dev.neovim.pro/lspsaga/rename/
rename = {
in_select = false,
auto_save = false,
project_max_width = 0.5,
project_max_height = 0.5,
keys = {
edit = "e",
vsplit = "v",
split = "s",
tabe = "t",
quit = "q",
shuttle = "[]",
toggle_or_req = "u",
close = "<Esc>",
quit = "<C-c>",
exec = "<CR>",
select = "x",
},
},
-- https://dev.neovim.pro/lspsaga/misc/#beacon
beacon = {
enable = true,
frequency = 12,
},
-- https://dev.neovim.pro/lspsaga/misc/#generic-ui-options
ui = {
title = true,
devicon = true,
border = "single", -- Can be single, double, rounded, solid, shadow.
actionfix = icons.ui.Spell,
devicon = true,
title = true,
expand = icons.ui.ArrowClosed,
collapse = icons.ui.ArrowOpen,
code_action = icons.ui.CodeAction,
actionfix = icons.ui.Spell,
lines = { "", "", "", "", "" },
imp_sign = icons.kind.Implementation,
kind = {
-- Kind
Expand Down Expand Up @@ -198,5 +223,10 @@ return function()
Value = { icons.kind.Value, "LspKindValue" },
},
},
-- https://dev.neovim.pro/lspsaga/misc/#scrolling-keymaps
scroll_preview = {
scroll_down = "<C-j>",
scroll_up = "<C-k>",
},
})
end
4 changes: 3 additions & 1 deletion lua/modules/configs/editor/rainbow_delims.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ return function()
if errors < 0 then
return nil
end
return (check_lines and vim.fn.line("$") > 450) and require("rainbow-delimiters").strategy["global"]
return (check_lines and vim.fn.line("$") > 350) and require("rainbow-delimiters").strategy["global"]
or require("rainbow-delimiters").strategy["local"]
end
end
Expand All @@ -20,6 +20,8 @@ return function()
[""] = init_strategy(false),
c = init_strategy(true),
cpp = init_strategy(true),
vimdoc = init_strategy(true),
vim = init_strategy(true),
},
query = {
[""] = "rainbow-delimiters",
Expand Down
3 changes: 2 additions & 1 deletion lua/modules/configs/editor/vimtex.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
return function()
vim.g.vimtex_view_method = "zathura"
vim.g.vimtex_view_method = "skim"
vim.g.vimtex_compiler_latexmk_engines = {
_ = "-xelatex",
}
vim.g.tex_comment_nospell = 1
vim.g.vimtex_compiler_progname = "nvr"
vim.g.vimtex_view_skim_sync = 1
end
5 changes: 5 additions & 0 deletions lua/modules/configs/editor/wrapping.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
return function()
require("wrapping").setup({
softener = { latex = 0.8 },
})
end
Loading

0 comments on commit e97225b

Please sign in to comment.