aboutsummaryrefslogtreecommitdiff
path: root/store/home/config/nvim/lua/setup/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'store/home/config/nvim/lua/setup/init.lua')
-rw-r--r--store/home/config/nvim/lua/setup/init.lua45
1 files changed, 45 insertions, 0 deletions
diff --git a/store/home/config/nvim/lua/setup/init.lua b/store/home/config/nvim/lua/setup/init.lua
new file mode 100644
index 0000000..91bd718
--- /dev/null
+++ b/store/home/config/nvim/lua/setup/init.lua
@@ -0,0 +1,45 @@
+local function close_float()
+ local wins = vim.api.nvim_list_wins()
+ for _, v in ipairs(wins) do
+ if vim.api.nvim_win_get_config(v).relative ~= '' then
+ vim.api.nvim_win_close(v, false)
+ end
+ end
+end
+
+local function setup()
+ if vim.fn.has("win32") ~= 0 then
+ require("setup.win").setup()
+ end
+
+ -- spellchecker: ignore termguicolors
+ vim.opt.termguicolors = true;
+ vim.opt.fileformats = "unix,dos";
+ vim.opt.number = true;
+
+ vim.g.load_doxygen_syntax = true;
+ vim.g.doxygen_javadoc_autobrief = false;
+
+ vim.keymap.set("n", "<c-tab>", "<cmd>bnext<cr>")
+ vim.keymap.set("n", "<c-s-tab>", "<cmd>bNext<cr>")
+ vim.keymap.set("n", "<esc>", close_float)
+ vim.keymap.set('t', '<A-n>', '<C-\\><C-n>')
+ vim.keymap.set('t', '<A-p>', function()
+ local register = vim.fn.input("Enter register: ")
+ if register == "" then
+ register = '"'
+ end
+ return '<C-\\><C-N>"' .. register .. 'pi'
+ end, { expr = true })
+
+ vim.cmd("autocmd FileType gitcommit,gitrebase,gitconfig set bufhidden=delete")
+
+ vim.diagnostic.config({ virtual_text = true })
+
+ require("setup.lsp").setup()
+ require("setup.plugins").setup()
+end
+
+return {
+ setup = setup
+}