From 9e72d8a2b62eb277f646c6e80c4f8509c6e4eec5 Mon Sep 17 00:00:00 2001 From: newbieQQ Date: Wed, 15 Nov 2023 23:40:02 +0800 Subject: [PATCH] changes flask --- init.lua | 11 +++----- lua/{normal => }/keymap.lua | 18 +++++------- lua/neovim/keymap.lua | 1 - lua/neovim/neovim.lua | 4 --- lua/neovim/options.lua | 6 ---- lua/neovim/plug.lua | 24 ---------------- lua/neovim/plugsettings/theme.lua | 5 ---- lua/normal/normal.lua | 4 --- lua/normal/plug.lua | 15 ---------- lua/{normal => }/options.lua | 0 lua/plugs.lua | 28 +++++++++++++++++++ lua/{neovim/plugsettings => plugs}/coc.lua | 0 .../plugsettings => plugs}/edit-plugs.lua | 0 lua/{normal/plugsettings => plugs}/hop.lua | 0 .../plugsettings => plugs}/lualine.lua | 0 .../plugsettings => plugs}/nvimtree.lua | 0 lua/plugs/theme.lua | 12 ++++++++ .../plugsettings => plugs}/treesitter.lua | 0 lua/{vscode/options.lua => vscode.lua} | 0 lua/vscode/keymap.lua | 6 ---- lua/vscode/plug.lua | 0 lua/vscode/vscode.lua | 1 - 22 files changed, 51 insertions(+), 84 deletions(-) rename lua/{normal => }/keymap.lua (81%) delete mode 100644 lua/neovim/keymap.lua delete mode 100644 lua/neovim/neovim.lua delete mode 100644 lua/neovim/options.lua delete mode 100644 lua/neovim/plug.lua delete mode 100644 lua/neovim/plugsettings/theme.lua delete mode 100644 lua/normal/normal.lua delete mode 100644 lua/normal/plug.lua rename lua/{normal => }/options.lua (100%) create mode 100644 lua/plugs.lua rename lua/{neovim/plugsettings => plugs}/coc.lua (100%) rename lua/{normal/plugsettings => plugs}/edit-plugs.lua (100%) rename lua/{normal/plugsettings => plugs}/hop.lua (100%) rename lua/{neovim/plugsettings => plugs}/lualine.lua (100%) rename lua/{neovim/plugsettings => plugs}/nvimtree.lua (100%) create mode 100644 lua/plugs/theme.lua rename lua/{neovim/plugsettings => plugs}/treesitter.lua (100%) rename lua/{vscode/options.lua => vscode.lua} (100%) delete mode 100644 lua/vscode/keymap.lua delete mode 100644 lua/vscode/plug.lua delete mode 100644 lua/vscode/vscode.lua diff --git a/init.lua b/init.lua index 2e23146..b889ff1 100644 --- a/init.lua +++ b/init.lua @@ -2,7 +2,7 @@ G = require('G') if G.g.vscode then - require('vscode.vscode') + require('vscode') else local lazypath = G.fn.stdpath("data") .. "/lazy/lazy.nvim" if not G.loop.fs_stat(lazypath) then @@ -27,15 +27,12 @@ else end G.opt.rtp:prepend(lazypath) - require("lazy").setup({ - require('normal.plug'), - require('neovim.plug'), - }) + require("lazy").setup(require('plugs')) - require('normal.normal') - require('neovim.neovim') end +require("keymap") +require("options") diff --git a/lua/normal/keymap.lua b/lua/keymap.lua similarity index 81% rename from lua/normal/keymap.lua rename to lua/keymap.lua index ac0632e..388ad4a 100644 --- a/lua/normal/keymap.lua +++ b/lua/keymap.lua @@ -35,14 +35,15 @@ G.map({ {'n', '', 'l', opt}, -{'n', '', ':q', opt}, -{'n', '', ':s', opt}, -{'n', '', ':w !sudo tee %', opt}, +{'n', '', ':q', opt}, +{'n', '', ':w !sudo tee %', opt}, +{'n', '', ':q!', opt}, -{'n', 'y', 'ggyG', opt}, -{'n', 'p', 'ggpG', opt}, -{'n', 'v', 'ggVG', opt}, + +{'n', 'y', 'ggyG', opt}, +{'n', 'p', 'ggpG', opt}, +{'n', 'v', 'ggVG', opt}, {'n', '', ':res -5', opt}, {'n', '', ':res +5', opt}, @@ -51,8 +52,3 @@ G.map({ }) - - - - - diff --git a/lua/neovim/keymap.lua b/lua/neovim/keymap.lua deleted file mode 100644 index 8b13789..0000000 --- a/lua/neovim/keymap.lua +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lua/neovim/neovim.lua b/lua/neovim/neovim.lua deleted file mode 100644 index 28effcc..0000000 --- a/lua/neovim/neovim.lua +++ /dev/null @@ -1,4 +0,0 @@ --- require('neovim.plugsettings.plug') - -require('neovim.keymap') -require('neovim.options') diff --git a/lua/neovim/options.lua b/lua/neovim/options.lua deleted file mode 100644 index c7b1f6d..0000000 --- a/lua/neovim/options.lua +++ /dev/null @@ -1,6 +0,0 @@ -G.cmd("colorscheme tokyonight") -- 主题 - --- G.api.colorscheme = "tokyonight" -G.opt.background = 'dark' -- 背景 - - diff --git a/lua/neovim/plug.lua b/lua/neovim/plug.lua deleted file mode 100644 index b579ddc..0000000 --- a/lua/neovim/plug.lua +++ /dev/null @@ -1,24 +0,0 @@ -return { - - 'github/copilot.vim', -- github copilot - 'vijaymarupudi/nvim-fzf', -- fzf - 'lilydjwg/colorizer', --颜色识别 - - - require('neovim.plugsettings.coc'), -- coc - require('neovim.plugsettings.lualine'), -- lualine - require('neovim.plugsettings.nvimtree'), -- nvimtree - require('neovim.plugsettings.treesitter'), -- treesitter - require('neovim.plugsettings.theme'), - - -- nerdtree - -- { - -- 'preservim/nerdtree', - -- dependencies = { - -- 'Xuyuanp/nerdtree-git-plugin', - -- 'ryanoasis/vim-devicons', - -- }, - -- cmd = 'NERDTreeToggle', - -- }, - -} diff --git a/lua/neovim/plugsettings/theme.lua b/lua/neovim/plugsettings/theme.lua deleted file mode 100644 index 507a9f1..0000000 --- a/lua/neovim/plugsettings/theme.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - 'shaunsingh/nord.nvim', -- 主题插件 - 'folke/tokyonight.nvim', -} - diff --git a/lua/normal/normal.lua b/lua/normal/normal.lua deleted file mode 100644 index 9649f89..0000000 --- a/lua/normal/normal.lua +++ /dev/null @@ -1,4 +0,0 @@ -require('normal.keymap') -require('normal.options') - - diff --git a/lua/normal/plug.lua b/lua/normal/plug.lua deleted file mode 100644 index 39a7496..0000000 --- a/lua/normal/plug.lua +++ /dev/null @@ -1,15 +0,0 @@ -return { - - - -- 多光标 - 'terryma/vim-multiple-cursors', - require("normal.plugsettings.edit-plugs"), - require("normal.plugsettings.hop"), - -} - - - - - - diff --git a/lua/normal/options.lua b/lua/options.lua similarity index 100% rename from lua/normal/options.lua rename to lua/options.lua diff --git a/lua/plugs.lua b/lua/plugs.lua new file mode 100644 index 0000000..7d36e6c --- /dev/null +++ b/lua/plugs.lua @@ -0,0 +1,28 @@ +return { + + 'github/copilot.vim', -- github copilot + 'vijaymarupudi/nvim-fzf', -- fzf + 'lilydjwg/colorizer', -- 颜色识别 + 'terryma/vim-multiple-cursors', -- 多光标 + + + require('plugs.coc'), -- coc + require('plugs.lualine'), -- lualine + require('plugs.nvimtree'), -- nvimtree + require('plugs.treesitter'), -- treesitter + require('plugs.theme'), + + require("plugs.edit-plugs"), + require("plugs.hop"), + + -- nerdtree + -- { + -- 'preservim/nerdtree', + -- dependencies = { + -- 'Xuyuanp/nerdtree-git-plugin', + -- 'ryanoasis/vim-devicons', + -- }, + -- cmd = 'NERDTreeToggle', + -- }, + +} diff --git a/lua/neovim/plugsettings/coc.lua b/lua/plugs/coc.lua similarity index 100% rename from lua/neovim/plugsettings/coc.lua rename to lua/plugs/coc.lua diff --git a/lua/normal/plugsettings/edit-plugs.lua b/lua/plugs/edit-plugs.lua similarity index 100% rename from lua/normal/plugsettings/edit-plugs.lua rename to lua/plugs/edit-plugs.lua diff --git a/lua/normal/plugsettings/hop.lua b/lua/plugs/hop.lua similarity index 100% rename from lua/normal/plugsettings/hop.lua rename to lua/plugs/hop.lua diff --git a/lua/neovim/plugsettings/lualine.lua b/lua/plugs/lualine.lua similarity index 100% rename from lua/neovim/plugsettings/lualine.lua rename to lua/plugs/lualine.lua diff --git a/lua/neovim/plugsettings/nvimtree.lua b/lua/plugs/nvimtree.lua similarity index 100% rename from lua/neovim/plugsettings/nvimtree.lua rename to lua/plugs/nvimtree.lua diff --git a/lua/plugs/theme.lua b/lua/plugs/theme.lua new file mode 100644 index 0000000..939d392 --- /dev/null +++ b/lua/plugs/theme.lua @@ -0,0 +1,12 @@ +return { + 'shaunsingh/nord.nvim', -- 主题插件 + { + 'folke/tokyonight.nvim', + config = function () + G.cmd("colorscheme tokyonight") -- 主题 + -- G.api.colorscheme = "tokyonight" + G.opt.background = 'dark' -- 背景 + end + } +} + diff --git a/lua/neovim/plugsettings/treesitter.lua b/lua/plugs/treesitter.lua similarity index 100% rename from lua/neovim/plugsettings/treesitter.lua rename to lua/plugs/treesitter.lua diff --git a/lua/vscode/options.lua b/lua/vscode.lua similarity index 100% rename from lua/vscode/options.lua rename to lua/vscode.lua diff --git a/lua/vscode/keymap.lua b/lua/vscode/keymap.lua deleted file mode 100644 index bf3906a..0000000 --- a/lua/vscode/keymap.lua +++ /dev/null @@ -1,6 +0,0 @@ -local opt = {noremap = true} - -G.map({ - {'n', 'j', 'gj', opt}, - {'n', 'k', 'gk', opt}, -}) diff --git a/lua/vscode/plug.lua b/lua/vscode/plug.lua deleted file mode 100644 index e69de29..0000000 diff --git a/lua/vscode/vscode.lua b/lua/vscode/vscode.lua deleted file mode 100644 index 08b01fe..0000000 --- a/lua/vscode/vscode.lua +++ /dev/null @@ -1 +0,0 @@ -require("vscode.keymap")