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

View File

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

View File

@ -30,8 +30,6 @@ G.map({
{ 'n', '<c-c>', ':q<CR>', opt },
{ 'n', '<c-S>', ':w !sudo tee %<CR>', opt },
{ 'n', '<c-q>', ':q!<CR>', opt },
{ 'v', '<cs-y>', '"+y', 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,
})
G.au({ "VimEnter", "BufEnter" }, {
G.au({ "VimEnter" }, {
pattern = { "*.code-snippets" },
callback = function()
G.cmd("setfiletype json")
@ -69,23 +69,3 @@ G.au({ "VimEnter", "BufEnter" }, {
-- 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 {
'lilydjwg/colorizer', -- 颜色识别
-- "rest-nvim/rest.nvim",
-- dependencies = { { "nvim-lua/plenary.nvim" } },
-- config = function()
-- require("rest-nvim").setup({
-- --- Get the same options from Packer setup
-- })
-- end
-- },
-- {
-- -- go开发
-- "ray-x/go.nvim",
-- dependencies = { -- optional packages
-- "ray-x/guihua.lua",
-- "neovim/nvim-lspconfig",
-- "nvim-treesitter/nvim-treesitter",
-- },
-- config = function()
-- require("go").setup()
-- end,
-- -- event = { "CmdlineEnter" },
-- ft = { "go", 'gomod' },
-- build = ':lua require("go.install").update_all_sync()' -- if you need to install/update all binaries
-- },
{
-- 类似postman的curl工具
"rest-nvim/rest.nvim",
dependencies = { { "nvim-lua/plenary.nvim" } },
config = function()
require("rest-nvim").setup({
--- Get the same options from Packer setup
})
end
},
{
-- go开发
"ray-x/go.nvim",
dependencies = { -- optional packages
"ray-x/guihua.lua",
"neovim/nvim-lspconfig",
"nvim-treesitter/nvim-treesitter",
},
config = function()
require("go").setup()
end,
-- event = { "CmdlineEnter" },
ft = { "go", 'gomod' },
build = ':lua require("go.install").update_all_sync()' -- if you need to install/update all binaries
},
{
-- 终端
'akinsho/toggleterm.nvim',

View File

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

View File

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

View File

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

View File

@ -18,26 +18,5 @@
" $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",
"}"
]
}
}