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{
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 {
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")
return {
capabilities = require('cmp_nvim_lsp').default_capabilities(),
settings = {

View File

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

View File

@ -1,5 +1,10 @@
return {
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
}

View File

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