Переглянути джерело

fix

添加了,很多插件,并且配置了很多内容
scorpio 10 місяців тому
батько
коміт
a155baa492

+ 0 - 23
keymaps.lua

@@ -1,23 +0,0 @@
-local function map(mode, lhs, rhs, opts)
-    local options = { noremap = true, silent = true }
-    if opts then
-        options = vim.tbl_extend('force', options, opts)
-    end
-    vim.api.nvim_set_keymap(mode, lhs, rhs, options)
-end
-
--- 基础配置
-map("n", "qq", ":q!<CR>", { desc = "exit" })
-map("n", "<leader>w", ":w<CR>", { desc = "w" })
-map("n", "<leader>wq", ":wqa!<CR>", { desc = "wqa!" })
--- 取消 s 默认功能
-map("n", "s", "", {})
-map("n", "sv", ":vsp<CR>", { desc = "split window" })
-map("n", "sh", ":sp<CR>", { desc = "split " })
-map("n", "sc", "<C-w>c", { desc = "close windows" })
-map("n", "so", "<C-w>o", { desc = " close other windows" })
--- 切换窗口
-map("n", "<A-Right>", "<C-w>l", {})
-map("n", "<A-Down>", "<C-w>j", {})
-map("n", "<A-Up>", "<C-w>k", {})
-map("n", "<A-Left>", "<C-w>h", {})

+ 3 - 1
lazy-lock.json

@@ -14,12 +14,14 @@
   "noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" },
   "nui.nvim": { "branch": "main", "commit": "c9b4de623d19a85b353ff70d2ae9c77143abe69c" },
   "nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" },
-  "nvim-treesitter": { "branch": "master", "commit": "5a713474e38a3999b85c6cb3f5cac3248a16c7d0" },
+  "nvim-treesitter": { "branch": "master", "commit": "25ddfde8d7167d7d81403d6809242439037d2b68" },
+  "nvim-ts-autotag": { "branch": "main", "commit": "8515e48a277a2f4947d91004d9aa92c29fdc5e18" },
   "nvim-web-devicons": { "branch": "master", "commit": "a1425903ab52a0a0460622519e827f224e5b4fee" },
   "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
   "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
   "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
   "todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" },
+  "tokyonight.nvim": { "branch": "main", "commit": "f247ee700b569ed43f39320413a13ba9b0aef0db" },
   "vim-floaterm": { "branch": "master", "commit": "3f01a623376957437f9376327637491b74719e38" },
   "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
 }

+ 1 - 0
lua/plugins/dashboard.lua

@@ -1,3 +1,4 @@
+-- 用户配置启动页
 return {
   'nvimdev/dashboard-nvim',
   event = 'VimEnter',

+ 1 - 0
lua/plugins/floaterm.lua

@@ -1,3 +1,4 @@
+-- 悬浮终端
 return {
     {
         "voldikss/vim-floaterm",

+ 1 - 0
lua/plugins/indent-blankline.lua

@@ -1,3 +1,4 @@
+-- 配置所行线1
 return {
   "lukas-reineke/indent-blankline.nvim",
   main = "ibl",

+ 1 - 0
lua/plugins/lazygit.lua

@@ -1,3 +1,4 @@
+-- 配置lazygit 需要本地安装lazygit
 return
 {
     "kdheepak/lazygit.nvim",

+ 1 - 0
lua/plugins/lualine.lua

@@ -1,3 +1,4 @@
+-- 配置窗口底部 bar 的样式
 return {
   "nvim-lualine/lualine.nvim",
   config = function()

+ 1 - 0
lua/plugins/mini-indentscope.lua

@@ -1,3 +1,4 @@
+-- 配置所行线 有动画效果
 return {
   "echasnovski/mini.indentscope",
   version = false, -- wait till new 0.7.0 release to put it back on semver

+ 1 - 0
lua/plugins/mini-pairs.lua

@@ -1,3 +1,4 @@
+-- 配置自动tag 包括 下列内容
 return {
     'echasnovski/mini.pairs',
     version = false,

+ 8 - 7
lua/plugins/noice.lua

@@ -1,3 +1,4 @@
+-- 通知中心
 return {
   "folke/noice.nvim",
   event = "VeryLazy",
@@ -31,12 +32,12 @@ return {
   },
   -- stylua: ignore
   keys = {
-    { "<S-Enter>", function() require("noice").redirect(vim.fn.getcmdline()) end, mode = "c", desc = "Redirect Cmdline" },
-    { "<leader>snl", function() require("noice").cmd("last") end, desc = "Noice Last Message" },
-    { "<leader>snh", function() require("noice").cmd("history") end, desc = "Noice History" },
-    { "<leader>sna", function() require("noice").cmd("all") end, desc = "Noice All" },
-    { "<leader>snd", function() require("noice").cmd("dismiss") end, desc = "Dismiss All" },
-    { "<c-f>", function() if not require("noice.lsp").scroll(4) then return "<c-f>" end end, silent = true, expr = true, desc = "Scroll forward", mode = {"i", "n", "s"} },
-    { "<c-b>", function() if not require("noice.lsp").scroll(-4) then return "<c-b>" end end, silent = true, expr = true, desc = "Scroll backward", mode = {"i", "n", "s"}},
+    { "<S-Enter>",   function() require("noice").redirect(vim.fn.getcmdline()) end,                 mode = "c",                 desc = "Redirect Cmdline" },
+    { "<leader>snl", function() require("noice").cmd("last") end,                                   desc = "Noice Last Message" },
+    { "<leader>snh", function() require("noice").cmd("history") end,                                desc = "Noice History" },
+    { "<leader>sna", function() require("noice").cmd("all") end,                                    desc = "Noice All" },
+    { "<leader>snd", function() require("noice").cmd("dismiss") end,                                desc = "Dismiss All" },
+    { "<c-f>",       function() if not require("noice.lsp").scroll(4) then return "<c-f>" end end,  silent = true,              expr = true,              desc = "Scroll forward",  mode = { "i", "n", "s" } },
+    { "<c-b>",       function() if not require("noice.lsp").scroll(-4) then return "<c-b>" end end, silent = true,              expr = true,              desc = "Scroll backward", mode = { "i", "n", "s" } },
   },
 }

+ 1 - 0
lua/plugins/nvim-notify.lua

@@ -1,3 +1,4 @@
+--  悬浮通知
 return {
   "rcarriga/nvim-notify",
   keys = {

+ 4 - 0
lua/plugins/nvim-ts-autotag.lua

@@ -0,0 +1,4 @@
+return {
+  "windwp/nvim-ts-autotag",
+  opts = {}
+}

+ 1 - 0
lua/plugins/todo-comments.lua

@@ -1,3 +1,4 @@
+--  todo 标签
 return {
   "folke/todo-comments.nvim",
   dependencies = { "nvim-lua/plenary.nvim" },

+ 2 - 1
lua/plugins/treesitter.lua

@@ -1,3 +1,4 @@
+-- 配置代码高亮,mac 苹果芯片,ensure_install 需要通过默认终端来启动安装,否则会一直报错
 return {
   {
     "nvim-treesitter/nvim-treesitter",
@@ -5,7 +6,7 @@ return {
     config = function()
       local config = require("nvim-treesitter.configs")
       config.setup({
-        ensure_installed = { "lua", "javascript" },
+        ensure_installed = { "bash", "toml", "luap", "luadoc", "markdown", "tsx", "c", "lua", "vim", "vimdoc", "query", "javascript", "dart", "go", "html", "java", "json", "json5", "kotlin", "python", "rust", "scss", "sql", "typescript", "vue", "xml", "yaml" },
         highlight = { enable = true },
         indent = { enable = true }
       })

+ 1 - 0
lua/plugins/whick-key.lua

@@ -1,3 +1,4 @@
+-- 快捷键提示
 return {
   "folke/which-key.nvim",
   event = "VeryLazy",