feat: modify for v0.9.2

This commit is contained in:
2023-09-13 12:29:12 +08:00
parent d2aa7bad86
commit 47f16510b2
8 changed files with 47 additions and 78 deletions
+1 -1
View File
@@ -1 +1 @@
{"nvim-dap": {"commit": "69b7c68"}, "FixCursorHold.nvim": {"commit": "70a9516"}, "nvcode-color-schemes.vim": {"commit": "3a0e624"}, "telescope-fzf-native.nvim": {"commit": "fab3e22"}, "codi.vim": {"commit": "6537ba6"}, "packer.nvim": {"commit": "dac4088"}, "nvim-lspconfig": {"commit": "6b43ce5"}, "playground": {"commit": "8a887bc"}, "numb.nvim": {"commit": "d95b7ea"}, "nvim-treesitter": {"commit": "12e95e1"}, "cmp-cmdline": {"commit": "23c51b2"}, "telescope-file-browser.nvim": {"commit": "304508f"}, "aerial.nvim": {"commit": "6050ff7"}, "cmp-nvim-lsp": {"commit": "5922477"}, "friendly-snippets": {"commit": "484fb38"}, "vim-vsnip": {"commit": "8dde8c0"}, "nvim-autopairs": {"commit": "03580d7"}, "nvim-colorizer.lua": {"commit": "36c610a"}, "nvim-comment": {"commit": "e9ac16a"}, "tabular": {"commit": "339091a"}, "vim-fugitive": {"commit": "99cdb88"}, "rnvimr": {"commit": "64579c4"}, "gitsigns.nvim": {"commit": "2ab3bdf"}, "glow.nvim": {"commit": "20d1cd0"}, "lspkind-nvim": {"commit": "c68b3a0"}, "which-key.nvim": {"commit": "8682d30"}, "telescope.nvim": {"commit": "a606bd1"}, "telescope-project.nvim": {"commit": "8e8ee37"}, "trouble.nvim": {"commit": "897542f"}, "nvim-ts-context-commentstring": {"commit": "4a42b30"}, "lsp_signature.nvim": {"commit": "1979f11"}, "one-monokai-vim": {"commit": "4fdfd93"}, "gruvbox.nvim": {"commit": "c64ec55"}, "nvim-lsp-installer": {"commit": "17e0bfa"}, "dashboard-nvim": {"commit": "d82ddae"}, "LuaSnip": {"commit": "e687d78"}, "vim-go-coverage": {"commit": "d9b0c9f"}, "nvim-dap-ui": {"commit": "54365d2"}, "popup.nvim": {"commit": "b7404d3"}, "cmp-vsnip": {"commit": "989a8a7"}, "nvim-bqf": {"commit": "b418b0a"}, "FTerm.nvim": {"commit": "d132089"}, "nvim-dap-virtual-text": {"commit": "2971ce3"}, "neotest-go": {"commit": "981406c"}, "nvim-ts-autotag": {"commit": "fdefe46"}, "neotest": {"commit": "414b43f"}, "vim-matchup": {"commit": "db5120d"}, "nvim-luapad": {"commit": "a5b3d6a"}, "monokai.nvim": {"commit": "45427b2"}, "lspsaga.nvim": {"commit": "5faeec9"}, "vim-markdown": {"commit": "df4be86"}, "hop.nvim": {"commit": "75f73d3"}, "barbar.nvim": {"commit": "bb2e5e4"}, "nvim-tree.lua": {"commit": "bac962c"}, "bracey.vim": {"commit": "4e1a22a"}, "fzf-lua": {"commit": "7bb05a7"}, "lsp-rooter.nvim": {"commit": "7c83364"}, "toggleterm.nvim": {"commit": "f494c61"}, "plenary.nvim": {"commit": "4b7e520"}, "nvim-cmp": {"commit": "c49ad26"}, "telescope-dap.nvim": {"commit": "313d2ea"}, "galaxyline.nvim": {"commit": "be96f3d"}, "markdown-preview.nvim": {"commit": "02cc387"}, "nvim-web-devicons": {"commit": "05e1072"}, "DAPInstall.nvim": {"commit": "bbda2b0"}, "neodev.nvim": {"commit": "c045c0f"}, "cmp-path": {"commit": "91ff86c"}, "cmp-buffer": {"commit": "3022dbc"}} {"nvim-dap": {"commit": "69b7c68"}, "FixCursorHold.nvim": {"commit": "70a9516"}, "nvcode-color-schemes.vim": {"commit": "3a0e624"}, "telescope-fzf-native.nvim": {"commit": "fab3e22"}, "glow.nvim": {"commit": "20d1cd0"}, "packer.nvim": {"commit": "dac4088"}, "nvim-lspconfig": {"commit": "6b43ce5"}, "playground": {"commit": "8a887bc"}, "numb.nvim": {"commit": "d95b7ea"}, "nvim-treesitter": {"commit": "12e95e1"}, "which-key.nvim": {"commit": "8682d30"}, "telescope-file-browser.nvim": {"commit": "304508f"}, "aerial.nvim": {"commit": "6050ff7"}, "nvim-autopairs": {"commit": "03580d7"}, "neotest-go": {"commit": "981406c"}, "nvim-colorizer.lua": {"commit": "36c610a"}, "toggleterm.nvim": {"commit": "f494c61"}, "tabular": {"commit": "339091a"}, "vim-fugitive": {"commit": "99cdb88"}, "rnvimr": {"commit": "64579c4"}, "gitsigns.nvim": {"commit": "2ab3bdf"}, "codi.vim": {"commit": "6537ba6"}, "lspkind-nvim": {"commit": "c68b3a0"}, "cmp-cmdline": {"commit": "23c51b2"}, "telescope.nvim": {"commit": "a606bd1"}, "telescope-project.nvim": {"commit": "8e8ee37"}, "trouble.nvim": {"commit": "897542f"}, "nvim-ts-context-commentstring": {"commit": "4a42b30"}, "lsp_signature.nvim": {"commit": "1979f11"}, "nvim-lint": {"commit": "e03f265"}, "one-monokai-vim": {"commit": "4fdfd93"}, "gruvbox.nvim": {"commit": "c64ec55"}, "nvim-lsp-installer": {"commit": "17e0bfa"}, "cmp-nvim-lsp": {"commit": "5922477"}, "dashboard-nvim": {"commit": "d82ddae"}, "LuaSnip": {"commit": "e687d78"}, "vim-go-coverage": {"commit": "d9b0c9f"}, "vim-matchup": {"commit": "db5120d"}, "popup.nvim": {"commit": "b7404d3"}, "cmp-vsnip": {"commit": "989a8a7"}, "nvim-bqf": {"commit": "b418b0a"}, "FTerm.nvim": {"commit": "d132089"}, "nvim-dap-virtual-text": {"commit": "2971ce3"}, "vim-vsnip": {"commit": "8dde8c0"}, "nvim-ts-autotag": {"commit": "fdefe46"}, "neotest": {"commit": "414b43f"}, "nvim-dap-ui": {"commit": "54365d2"}, "barbar.nvim": {"commit": "bb2e5e4"}, "monokai.nvim": {"commit": "45427b2"}, "lspsaga.nvim": {"commit": "5faeec9"}, "vim-markdown": {"commit": "df4be86"}, "hop.nvim": {"commit": "75f73d3"}, "nvim-luapad": {"commit": "a5b3d6a"}, "nvim-tree.lua": {"commit": "bac962c"}, "bracey.vim": {"commit": "4e1a22a"}, "fzf-lua": {"commit": "7bb05a7"}, "lsp-rooter.nvim": {"commit": "7c83364"}, "nvim-comment": {"commit": "e9ac16a"}, "plenary.nvim": {"commit": "4b7e520"}, "nvim-cmp": {"commit": "c49ad26"}, "telescope-dap.nvim": {"commit": "313d2ea"}, "galaxyline.nvim": {"commit": "be96f3d"}, "markdown-preview.nvim": {"commit": "02cc387"}, "nvim-web-devicons": {"commit": "05e1072"}, "DAPInstall.nvim": {"commit": "bbda2b0"}, "neodev.nvim": {"commit": "c045c0f"}, "cmp-path": {"commit": "91ff86c"}, "cmp-buffer": {"commit": "3022dbc"}}
-5
View File
@@ -9,11 +9,6 @@ require('gitsigns').setup {
}, },
numhl = false, numhl = false,
linehl = false, linehl = false,
keymaps = {
-- Default keymap options
noremap = true,
buffer = true,
},
watch_gitdir = { watch_gitdir = {
interval = 1000 interval = 1000
}, },
+1 -1
View File
@@ -5,7 +5,7 @@ require('pluginconfig/dashboard-nvim')
require('pluginconfig/galaxyline') require('pluginconfig/galaxyline')
require('pluginconfig/gitsigns') require('pluginconfig/gitsigns')
require('pluginconfig/hop') require('pluginconfig/hop')
require('pluginconfig/lspinstall') require('pluginconfig/mason')
require('pluginconfig/neodev') -- must before lspconfig require('pluginconfig/neodev') -- must before lspconfig
require('pluginconfig/mkdx') require('pluginconfig/mkdx')
require('pluginconfig/neotest') require('pluginconfig/neotest')
-21
View File
@@ -1,21 +0,0 @@
local lsp_installer = require("nvim-lsp-installer")
lsp_installer.settings({
install_root_dir = table.concat { vim.fn.stdpath("data"), "/lspinstall" },
})
-- Register a handler that will be called for each installed server when it's ready (i.e. when installation is finished
-- or if the server is already installed).
lsp_installer.on_server_ready(function(server)
local opts = {
}
-- (optional) Customize the options passed to the server
-- if server.name == "tsserver" then
-- opts.root_dir = function() ... end
-- end
-- This setup() function will take the provided server configuration and decorate it with the necessary properties
-- before passing it onwards to lspconfig.
-- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
server:setup(opts)
end)
+1
View File
@@ -0,0 +1 @@
require("mason").setup()
+20
View File
@@ -0,0 +1,20 @@
local lint_lib = require('lint')
lint_lib.linters_by_ft = {
go = {'golangcilint'}
}
local golangcilint = lint_lib.linters.golangcilint
golangcilint.args = {
'run',
'--config',
'~/.dotfile/.golangci_strict.yml',
'--out-format',
'json',
}
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
callback = function()
require("lint").try_lint()
end,
})
+19 -41
View File
@@ -1,5 +1,22 @@
local tree_cb = require'nvim-tree.config'.nvim_tree_callback local function my_on_attach(bufnr)
local api = require "nvim-tree.api"
local function opts(desc)
return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
end
-- default mappings
api.config.mappings.default_on_attach(bufnr)
-- custom mappings
vim.keymap.set('n', '<C-t>', api.tree.change_root_to_parent, opts('Up'))
vim.keymap.set('n', '?', api.tree.toggle_help, opts('Help'))
vim.keymap.set('n', 'l', api.node.open.edit, opts('Edit'))
vim.keymap.set('n', 'h', api.node.navigate.parent_close, opts('Parent Close'))
end
require'nvim-tree'.setup { require'nvim-tree'.setup {
on_attach = my_on_attach,
disable_netrw = true, disable_netrw = true,
hijack_netrw = true, hijack_netrw = true,
--auto_close = false, --auto_close = false,
@@ -22,46 +39,6 @@ require'nvim-tree'.setup {
-- only relevant when `update_focused_file.update_cwd` is true and `update_focused_file.enable` is true -- only relevant when `update_focused_file.update_cwd` is true and `update_focused_file.enable` is true
ignore_list = {} ignore_list = {}
}, },
view = {
mappings = {
--custome_only= false,
list = {
-- ["<CR>"] = ":YourVimFunction()<cr>",
-- ["u"] = ":lua require'some_module'.some_function()<cr>",
-- default mappings
{key="<CR>" ,cb= tree_cb("edit")},
{key="o" ,cb= tree_cb("edit")},
{key="l" ,action="edit"},
{key="<2-LeftMouse>" ,cb= tree_cb("edit")},
{key="<2-RightMouse>" ,cb= tree_cb("cd")},
{key="<C->" ,cb= tree_cb("cd")},
{key="v" ,cb= tree_cb("vsplit")},
{key="s" ,cb= tree_cb("split")},
{key="<C-t>" ,cb= tree_cb("tabnew")},
{key="<" ,cb= tree_cb("prev_sibling")},
{key=">" ,cb= tree_cb("next_sibling")},
{key="<BS>" ,cb= tree_cb("close_node")},
{key="h" ,action="close_node"},
{key="<S-CR>" ,cb= tree_cb("close_node")},
{key="<Tab>" ,cb= tree_cb("preview")},
{key="I" ,cb= tree_cb("toggle_ignored")},
{key="H" ,cb= tree_cb("toggle_dotfiles")},
{key="R" ,cb= tree_cb("refresh")},
{key="a" ,cb= tree_cb("create")},
{key="d" ,cb= tree_cb("remove")},
{key="r" ,cb= tree_cb("rename")},
{key="<C-r>" ,cb= tree_cb("full_rename")},
{key="x" ,cb= tree_cb("cut")},
{key="c" ,cb= tree_cb("copy")},
{key="p" ,cb= tree_cb("paste")},
{key="[c" ,cb= tree_cb("prev_git_item")},
{key="c" ,cb= tree_cb("next_git_item")},
{key="-" ,cb= tree_cb("dir_up")},
{key="q" ,cb= tree_cb("close")},
}
}
}
} }
vim.g.nvim_tree_indent_markers = 1 -- "0 by default, this option shows indent markers when folders are open vim.g.nvim_tree_indent_markers = 1 -- "0 by default, this option shows indent markers when folders are open
@@ -73,3 +50,4 @@ vim.g.nvim_tree_icons = {
git = {unstaged = "", staged = "✓", unmerged = "", renamed = "➜", untracked = ""}, git = {unstaged = "", staged = "✓", unmerged = "", renamed = "➜", untracked = ""},
folder = {default = "", open = "", empty = "", empty_open = "", symlink = ""} folder = {default = "", open = "", empty = "", empty_open = "", symlink = ""}
} }
+5 -9
View File
@@ -37,7 +37,7 @@ return require("packer").startup(function(use)
-- TODO refactor all of this (for now it works, but yes I know it could be wrapped in a simpler function) -- TODO refactor all of this (for now it works, but yes I know it could be wrapped in a simpler function)
use { "neovim/nvim-lspconfig"} use { "neovim/nvim-lspconfig"}
use { 'tami5/lspsaga.nvim', opt = true } use { 'tami5/lspsaga.nvim', opt = true }
use { "williamboman/nvim-lsp-installer", opt = true } use { "williamboman/mason.nvim" }
use { "folke/trouble.nvim", opt = true } use { "folke/trouble.nvim", opt = true }
use { 'stevearc/aerial.nvim', config = function() require('aerial').setup() end } use { 'stevearc/aerial.nvim', config = function() require('aerial').setup() end }
use {'mfussenegger/nvim-lint'} use {'mfussenegger/nvim-lint'}
@@ -81,10 +81,10 @@ return require("packer").startup(function(use)
-- Explorer -- Explorer
use { use {
'kyazdani42/nvim-tree.lua', 'nvim-tree/nvim-tree.lua',
requires = 'kyazdani42/nvim-web-devicons', requires = {
opt = true, 'nvim-tree/nvim-web-devicons', -- optional
config = function() require 'nvim-tree'.setup {} end },
} }
use { "ahmedkhalf/lsp-rooter.nvim", opt = true } -- with this nvim-tree will follow you use { "ahmedkhalf/lsp-rooter.nvim", opt = true } -- with this nvim-tree will follow you
-- TODO remove when open on dir is supported by nvimtree -- TODO remove when open on dir is supported by nvimtree
@@ -158,7 +158,6 @@ return require("packer").startup(function(use)
require_plugin("lspsaga.nvim") require_plugin("lspsaga.nvim")
require_plugin("nvim-lsp-installer")
require_plugin('trouble.nvim') require_plugin('trouble.nvim')
require_plugin("popup.nvim") require_plugin("popup.nvim")
require_plugin("plenary.nvim") require_plugin("plenary.nvim")
@@ -167,7 +166,6 @@ return require("packer").startup(function(use)
require_plugin("nvim-dap") require_plugin("nvim-dap")
require_plugin("nvim-ts-autotag") require_plugin("nvim-ts-autotag")
require_plugin('vim-matchup') require_plugin('vim-matchup')
require_plugin("nvim-tree.lua")
require_plugin("gitsigns.nvim") require_plugin("gitsigns.nvim")
require_plugin("which-key.nvim") require_plugin("which-key.nvim")
require_plugin("dashboard-nvim") require_plugin("dashboard-nvim")
@@ -194,8 +192,6 @@ return require("packer").startup(function(use)
use { "akinsho/toggleterm.nvim", tag = '*', config = function() use { "akinsho/toggleterm.nvim", tag = '*', config = function()
require("toggleterm").setup() require("toggleterm").setup()
end } end }
use { "Pocco81/DAPInstall.nvim", opt = true }
require_plugin("DAPInstall.nvim")
use { use {
'phaazon/hop.nvim', 'phaazon/hop.nvim',