Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add/replace plugins ( #494 ) #514

Merged
merged 6 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions lua/modules/configs/completion/autopairs.lua

This file was deleted.

2 changes: 2 additions & 0 deletions lua/modules/configs/completion/cmp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,14 @@ return function()
{ name = "nvim_lua" },
{ name = "luasnip" },
{ name = "path" },
{ name = "treesitter" },
{ name = "spell" },
{ name = "tmux" },
{ name = "orgmode" },
{ name = "buffer" },
{ name = "latex_symbols" },
{ name = "copilot" },
-- { name = "codeium" },
-- { name = "cmp_tabnine" },
},
})
Expand Down
3 changes: 3 additions & 0 deletions lua/modules/configs/completion/codeium.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
return function()
require("codeium").setup({})
end
22 changes: 22 additions & 0 deletions lua/modules/configs/editor/autoclose.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
return function()
require("autoclose").setup({
keys = {
["("] = { escape = false, close = true, pair = "()" },
["["] = { escape = false, close = true, pair = "[]" },
["{"] = { escape = false, close = true, pair = "{}" },

[">"] = { escape = true, close = false, pair = "<>" },
[")"] = { escape = true, close = false, pair = "()" },
["]"] = { escape = true, close = false, pair = "[]" },
["}"] = { escape = true, close = false, pair = "{}" },

['"'] = { escape = true, close = true, pair = '""' },
["'"] = { escape = true, close = true, pair = "''" },
["`"] = { escape = true, close = true, pair = "``" },
},
options = {
disabled_filetypes = nil,
disable_when_touch = false,
},
})
end
19 changes: 19 additions & 0 deletions lua/modules/configs/tool/fcitx5.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
return function()
require("fcitx5").setup({
msg = nil, -- string | nil: printed when startup is completed
imname = { -- fcitx5.Imname | nil: imnames on each mode set as prior. See `:h map-table` for more in-depth information.
norm = nil, -- string | nil: imname to set in normal mode. if nil, will restore the mode on exit.
ins = nil,
cmd = nil,
vis = nil,
sel = nil,
opr = nil,
term = nil,
lang = nil,
},
remember_prior = true, -- boolean: if true, it remembers the mode on exit and restore it when entering the mode again.
-- if false, uses what was set in config.
define_autocmd = true, -- boolean: if true, defines autocmd at `ModeChanged` to switch fcitx5 mode.
log = "warn", -- string: log level (default: warn)
})
end
17 changes: 0 additions & 17 deletions lua/modules/configs/tool/imselect.lua

This file was deleted.

20 changes: 20 additions & 0 deletions lua/modules/configs/ui/paint.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
return function()
require("paint").setup({
---type PaintHighlight[]
highlights = {
{
-- filter can be a table of buffer options that should match,
-- or a function called with buf as param that should return true.
-- The example below will paint @something in comments with Constant
filter = { filetype = "lua" },
pattern = "%s*%-%-%-%s*(@%w+)",
hl = "Constant",
},
{
filter = { filetype = "python" },
pattern = "%s*(%w+:)",
hl = "Constant",
},
},
})
end
13 changes: 9 additions & 4 deletions lua/modules/plugins/completion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,16 @@ completion["hrsh7th/nvim-cmp"] = {
{ "f3fora/cmp-spell" },
{ "hrsh7th/cmp-buffer" },
{ "kdheepak/cmp-latex-symbols" },
{
"windwp/nvim-autopairs",
config = require("completion.autopairs"),
},
{ "ray-x/cmp-treesitter" },
-- { "tzachar/cmp-tabnine", build = "./install.sh", config = require("completion.tabnine") },
-- {
-- "jcdickinson/codeium.nvim",
-- dependencies = {
-- "nvim-lua/plenary.nvim",
-- "MunifTanjim/nui.nvim",
-- },
-- config = require("completion.codeium"),
-- },
},
}
completion["zbirenbaum/copilot.lua"] = {
Expand Down
5 changes: 5 additions & 0 deletions lua/modules/plugins/editor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ editor["rmagatti/auto-session"] = {
cmd = { "SaveSession", "RestoreSession", "DeleteSession" },
config = require("editor.auto-session"),
}
editor["m4xshen/autoclose.nvim"] = {
lazy = true,
event = "InsertEnter",
config = require("editor.autoclose"),
}
editor["max397574/better-escape.nvim"] = {
lazy = true,
event = { "CursorHold", "CursorHoldI" },
Expand Down
5 changes: 3 additions & 2 deletions lua/modules/plugins/tool.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ tool["folke/which-key.nvim"] = {
config = require("tool.which-key"),
}
-- only for fcitx5 user who uses non-English language during coding
-- tool["brglng/vim-im-select"] = {
-- tool["pysan3/fcitx5.nvim"] = {
-- lazy = true,
-- event = "BufReadPost",
-- config = require("tool.imselect"),
-- cond = vim.fn.executable("fcitx5-remote") == 1,
-- config = require("tool.fcitx5"),
-- }
tool["nvim-tree/nvim-tree.lua"] = {
lazy = true,
Expand Down
5 changes: 5 additions & 0 deletions lua/modules/plugins/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ ui["rcarriga/nvim-notify"] = {
event = "VeryLazy",
config = require("ui.notify"),
}
ui["folke/paint.nvim"] = {
lazy = true,
event = "BufReadPost",
config = require("ui.paint"),
}
ui["dstein64/nvim-scrollview"] = {
lazy = true,
event = "BufReadPost",
Expand Down