This commit is contained in:
newbie 2024-08-21 15:44:28 +08:00
parent 840422bde1
commit 6abd9e80c4
4 changed files with 36 additions and 27 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",
"http://git.qqnewbie.top/newbie/lazy.nvim.git", "https://github.com/folke/lazy.nvim.git",
"--branch=stable", "--branch=stable",
lazypath, lazypath,
}) })

11
lua/lsp/basedpyright.lua Normal file
View File

@ -0,0 +1,11 @@
return {
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

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

@ -11,7 +11,7 @@ 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'.pyright.setup(require('lsp.pyright')) require 'lspconfig'.basedpyright.setup(require('lsp.basedpyright'))
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'))