Compare commits

..

No commits in common. "22dde69f49966040311f6b9d36876f8a23aa80dd" and "08184ce63d6f262491b4b02bb556578c60068024" have entirely different histories.

10 changed files with 56 additions and 118 deletions

View File

@ -7,7 +7,7 @@ if not G.loop.fs_stat(lazypath) then
"git", "git",
"clone", "clone",
"--filter=blob:none", "--filter=blob:none",
"https://github.com/folke/lazy.nvim.git", "http://git.qqnewbie.top/newbie/lazy.nvim.git",
"--branch=stable", "--branch=stable",
lazypath, lazypath,
}) })
@ -26,7 +26,6 @@ G.opt.rtp:prepend(lazypath)
require("keymap") require("keymap")
if G.g.vscode then if G.g.vscode then
require('vscode') require('vscode')
else else

View File

@ -1,6 +1,6 @@
local G = {} local G = {}
G.use_ssh = false G.use_ssh = true
G.g = vim.g G.g = vim.g
G.b = vim.b G.b = vim.b

View File

@ -30,8 +30,6 @@ G.map({
{ 'n', '<c-c>', ':q<CR>', opt }, { 'n', '<c-c>', ':q<CR>', opt },
{ 'n', '<c-S>', ':w !sudo tee %<CR>', opt }, { 'n', '<c-S>', ':w !sudo tee %<CR>', opt },
{ 'n', '<c-q>', ':q!<CR>', opt }, { 'n', '<c-q>', ':q!<CR>', opt },
{ 'v', '<cs-y>', '"+y', opt },
{ 'n', '<leader>y', 'ggyG', opt }, { 'n', '<leader>y', 'ggyG', opt },

View File

@ -1,22 +0,0 @@
return {
-- capabilities = require("cmp_nvim_lsp").default_capabilities(),
settings = {
basedpyright = {
analysis = {
autoSearchPaths = true,
diagnosticMode = "openFilesOnly",
useLibraryCodeForTypes = true,
typeCheckingMode = "standard"
},
},
},
on_attach = function()
G.api.nvim_create_user_command('R', function()
G.cmd [[set splitbelow]]
G.cmd [[sp]]
G.cmd [[term python3 %]]
G.cmd [[resize 10]]
G.cmd [[startinsert]]
end, {})
end
}

View File

@ -56,7 +56,7 @@ G.au({ "InsertEnter" }, {
end, end,
}) })
G.au({ "VimEnter", "BufEnter" }, { G.au({ "VimEnter" }, {
pattern = { "*.code-snippets" }, pattern = { "*.code-snippets" },
callback = function() callback = function()
G.cmd("setfiletype json") G.cmd("setfiletype json")
@ -69,23 +69,3 @@ G.au({ "VimEnter", "BufEnter" }, {
-- if index -- if index
-- } -- }
-- }) -- })
local function isempty(s)
return s == nil or s == ""
end
local function use_if_defined(val, fallback)
return val ~= nil and val or fallback
end
local conda_prefix = os.getenv("CONDA_PREFIX")
if not isempty(conda_prefix) then
vim.g.python_host_prog = use_if_defined(vim.g.python_host_prog, conda_prefix .. "/bin/python")
vim.g.python3_host_prog = use_if_defined(vim.g.python3_host_prog, conda_prefix .. "/bin/python")
else
vim.g.python_host_prog = use_if_defined(vim.g.python_host_prog, "python")
vim.g.python3_host_prog = use_if_defined(vim.g.python3_host_prog, "python3")
end

View File

@ -1,28 +1,30 @@
return { return {
'lilydjwg/colorizer', -- 颜色识别 'lilydjwg/colorizer', -- 颜色识别
-- "rest-nvim/rest.nvim", {
-- dependencies = { { "nvim-lua/plenary.nvim" } }, -- 类似postman的curl工具
-- config = function() "rest-nvim/rest.nvim",
-- require("rest-nvim").setup({ dependencies = { { "nvim-lua/plenary.nvim" } },
-- --- Get the same options from Packer setup config = function()
-- }) require("rest-nvim").setup({
-- end --- Get the same options from Packer setup
-- }, })
-- { end
-- -- go开发 },
-- "ray-x/go.nvim", {
-- dependencies = { -- optional packages -- go开发
-- "ray-x/guihua.lua", "ray-x/go.nvim",
-- "neovim/nvim-lspconfig", dependencies = { -- optional packages
-- "nvim-treesitter/nvim-treesitter", "ray-x/guihua.lua",
-- }, "neovim/nvim-lspconfig",
-- config = function() "nvim-treesitter/nvim-treesitter",
-- require("go").setup() },
-- end, config = function()
-- -- event = { "CmdlineEnter" }, require("go").setup()
-- ft = { "go", 'gomod' }, end,
-- build = ':lua require("go.install").update_all_sync()' -- if you need to install/update all binaries -- event = { "CmdlineEnter" },
-- }, ft = { "go", 'gomod' },
build = ':lua require("go.install").update_all_sync()' -- if you need to install/update all binaries
},
{ {
-- 终端 -- 终端
'akinsho/toggleterm.nvim', 'akinsho/toggleterm.nvim',

View File

@ -20,7 +20,7 @@ return {
config = function() config = function()
G.map({ G.map({
{ "v", "ga", ":EasyAlign<CR>", { noremap = true } }, { "v", "ga", ":EasyAlign<CR>", { noremap = true } },
{ "v", "=", ":EasyAlign<CR>", { noremap = true } }, { "v", "=", ":EasyAlign<CR>", { noremap = true } },
}) })
end end
}, },
@ -45,14 +45,13 @@ return {
end end
}, },
-- { -- {
-- 'kevinhwang91/nvim-ufo', -- "askfiy/nvim-picgo",
-- dependencies = { -- config = function()
-- 'kevinhwang91/promise-async' -- G.map({
-- }, -- { 'n', '<leader>pp', ':UploadClipboard<CR>' }
-- config = function () -- })
-- require("ufo").setup() -- require("nvim-picgo").setup()
-- end -- end
-- }, -- },
{ {
-- hop -- hop

View File

@ -11,10 +11,11 @@ return {
require 'lspconfig'.lua_ls.setup(require('lsp.lua')) require 'lspconfig'.lua_ls.setup(require('lsp.lua'))
require 'lspconfig'.clangd.setup(require('lsp.c')) require 'lspconfig'.clangd.setup(require('lsp.c'))
require 'lspconfig'.bashls.setup(require('lsp.bash')) require 'lspconfig'.bashls.setup(require('lsp.bash'))
require 'lspconfig'.basedpyright.setup(require('lsp.basedpyright')) require 'lspconfig'.pyright.setup(require('lsp.pyright'))
require 'lspconfig'.yamlls.setup(require('lsp.yaml')) require 'lspconfig'.yamlls.setup(require('lsp.yaml'))
require 'lspconfig'.gopls.setup(require('lsp.go')) require 'lspconfig'.gopls.setup(require('lsp.go'))
require 'lspconfig'.jsonls.setup(require('lsp.json')) require 'lspconfig'.jsonls.setup(require('lsp.json'))
require 'lspconfig'.javals.setup()
G.map({ G.map({
@ -50,11 +51,13 @@ return {
} }
require("mason-lspconfig").setup({ require("mason-lspconfig").setup({
ensure_installed = { ensure_installed = {
"clangd",
"bashls", "bashls",
-- "basedpyright", "pyright",
"lua_ls", "lua_ls",
"jsonls", "jsonls",
"yamlls", "yamlls",
"gopls"
} }
}) })
end end

View File

@ -41,8 +41,8 @@
"#define head g.head", "#define head g.head",
"#define maps g.maps", "#define maps g.maps",
"#define add g.add", "#define add g.add",
"" "",
] ],
}, },
"Class_Graph_Dijkstra": { "Class_Graph_Dijkstra": {
"prefix": "Class_Graph_Dijkstra", "prefix": "Class_Graph_Dijkstra",
@ -74,8 +74,8 @@
" else", " else",
" return -1;", " return -1;",
"}", "}",
"" "",
] ],
}, },
"Class_Graph_SPFA": { "Class_Graph_SPFA": {
"prefix": "Class_Graph_SPFA", "prefix": "Class_Graph_SPFA",
@ -103,8 +103,8 @@
" if(dis[en] == inf) return -1;", " if(dis[en] == inf) return -1;",
" return dis[en];", " return dis[en];",
"}", "}",
"" "",
] ],
}, },
"Class_Graph_Kurskal": { "Class_Graph_Kurskal": {
"prefix": "Class_Graph_Kurskal", "prefix": "Class_Graph_Kurskal",
@ -121,8 +121,8 @@
" }", " }",
" return res;", " return res;",
"}", "}",
"" "",
] ],
}, },
"Class_Graph_Prim": { "Class_Graph_Prim": {
"prefix": "Class_Graph_Prim", "prefix": "Class_Graph_Prim",
@ -166,7 +166,7 @@
" ans = max(ans, max(up[i], dis1[i]));", " ans = max(ans, max(up[i], dis1[i]));",
" }", " }",
" return ans;", " return ans;",
"}" "}",
] ]
}, },
"Class_Graph_SCC": { "Class_Graph_SCC": {
@ -218,8 +218,8 @@
" return;", " return;",
" }", " }",
"};", "};",
"" "",
] ],
}, },
"Class_Graph_Euler": { "Class_Graph_Euler": {
"prefix": "Class_Graph_Euler", "prefix": "Class_Graph_Euler",
@ -270,7 +270,7 @@
"", "",
"};", "};",
"#define path eu.path", "#define path eu.path",
"" "",
] ]
}, },
"Class_Graph_LCA": { "Class_Graph_LCA": {
@ -318,8 +318,8 @@
" return fa[0][a];", " return fa[0][a];",
" }", " }",
"};", "};",
"" "",
] ],
}, },
"Class_Graph_erfen": { "Class_Graph_erfen": {
"prefix": "Class_Graph_erfen", "prefix": "Class_Graph_erfen",
@ -353,7 +353,7 @@
" return false;", " return false;",
" }", " }",
"};", "};",
"" "",
] ]
} }
} }

View File

@ -18,26 +18,5 @@
" $1", " $1",
"}" "}"
] ]
},
"ctx": {
"prefix": "ctx",
"body": [
"ctx := context.Background()"
]
},
"cok": {
"prefix": "cok",
"body": [
"c.JSON(http.StatusOK, vo.Success($1))"
]
},
"cbad": {
"prefix": "cbad",
"body": [
"if err != nil {",
" c.JSON(http.StatusBadRequest, vo.Fail(err))",
" return",
"}"
]
} }
} }