summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAotrix <[email protected]>2025-02-26 01:25:41 +0100
committerAotrix <[email protected]>2025-02-26 01:25:41 +0100
commit0dffa596c8315f449a7a7871ad1473f4e7d910b8 (patch)
tree011586ac4718778f0d81edc127d34e5950520776
parent32a43c4edaf9fc00aa09d76bd9382eaad57af256 (diff)
added nvim terminal config
-rw-r--r--init.lua14
-rw-r--r--lua/aotrix/cmake_autorun.lua3
-rw-r--r--lua/aotrix/nvim_term.lua8
3 files changed, 18 insertions, 7 deletions
diff --git a/init.lua b/init.lua
index 8374af9..1d2139e 100644
--- a/init.lua
+++ b/init.lua
@@ -1,16 +1,16 @@
-- Use of lazy
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
- vim.fn.system({
- "git", "clone",
- "--filter=blob:none",
- "https://github.com/folke/lazy.nvim.git",
- "--branch=stable", -- latest stable release
- lazypath,
- })
+ vim.fn.system({
+ "git", "clone", "--filter=blob:none",
+ "https://github.com/folke/lazy.nvim.git", "--branch=stable", -- latest stable release
+ lazypath
+ })
end
vim.opt.rtp:prepend(lazypath)
require('aotrix.set')
require('aotrix.remap')
+require('aotrix.nvim_term')
+require('aotrix.cmake_autorun')
require('lazy').setup('aotrix.plugins')
diff --git a/lua/aotrix/cmake_autorun.lua b/lua/aotrix/cmake_autorun.lua
new file mode 100644
index 0000000..9d5747e
--- /dev/null
+++ b/lua/aotrix/cmake_autorun.lua
@@ -0,0 +1,3 @@
+-- use :!cmake --build PATH_TO_BUILD_FOLDER
+-- && Telescope to choose executable in PATH_TO_BUILD_FOLDER/EXECUTABLE_FOLDER/*
+-- Then launch executable in a normal terminal - not nvim one
diff --git a/lua/aotrix/nvim_term.lua b/lua/aotrix/nvim_term.lua
new file mode 100644
index 0000000..aa1b312
--- /dev/null
+++ b/lua/aotrix/nvim_term.lua
@@ -0,0 +1,8 @@
+vim.api.nvim_create_autocmd("TermOpen",
+ {callback = function() vim.cmd "startinsert!" end})
+vim.api.nvim_create_autocmd('TermOpen', {
+ callback = function()
+ vim.opt_local.relativenumber = false
+ vim.opt_local.number = false
+ end
+})