This commit is contained in:
newbie 2024-01-06 00:30:26 +08:00
parent 4848f6e7dc
commit 1798c57e08
6 changed files with 25 additions and 3 deletions

View File

@ -1,3 +1,10 @@
return{ return{
on_attach = function()
G.api.nvim_create_user_command('R', function()
G.cmd [[set splitbelow]]
G.cmd [[sp]]
G.cmd [[term sh %]]
G.cmd [[startinsert]]
end, {})
end
} }

View File

@ -1,2 +1,10 @@
return { return {
on_attach = function()
G.api.nvim_create_user_command('R', function()
G.cmd [[set splitbelow]]
G.cmd [[sp]]
G.cmd [[term g++ "%" -o "%<" && ./"%<" && rm "%<"]]
G.cmd [[startinsert]]
end, {})
end
} }

View File

@ -4,6 +4,7 @@ table.insert(runtime_path, "lua/?.lua")
table.insert(runtime_path, "lua/?/init.lua") table.insert(runtime_path, "lua/?/init.lua")
return { return {
capabilities = require('cmp_nvim_lsp').default_capabilities(), capabilities = require('cmp_nvim_lsp').default_capabilities(),
settings = { settings = {

View File

@ -0,0 +1,2 @@
return {
}

View File

@ -1,5 +1,10 @@
return { return {
on_attach = function() on_attach = function()
G.cmd[[command! R !python3 %]] G.api.nvim_create_user_command('R', function()
G.cmd [[set splitbelow]]
G.cmd [[sp]]
G.cmd [[term python3 %]]
G.cmd [[startinsert]]
end, {})
end end
} }

View File

@ -173,7 +173,6 @@ return {
'onsails/lspkind-nvim', 'onsails/lspkind-nvim',
}, },
config = function() config = function()
-- require "cmp-nvim-lsp".setup {} -- require "cmp-nvim-lsp".setup {}
-- require "cmp-buffer".setup {} -- require "cmp-buffer".setup {}
-- require "cmp-path".setup {} -- require "cmp-path".setup {}