Update settings

This commit is contained in:
Saeed Afzal
2024-04-12 23:54:07 +01:00
parent 088c1e113d
commit 100ea186dd
20 changed files with 128 additions and 814 deletions

View File

@@ -1,37 +1,22 @@
-- Import core configuration
require("core")
-- Core configuration
require "core"
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
if not (vim.uv or vim.loop).fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- Import plugins
-- Init plugins
require("lazy").setup("plugins")
-- Set vim.notify
vim.notify = require("notify")
-- Terminal mappings
function _G.set_terminal_keymaps()
local opts = { buffer = 0 }
local set = vim.keymap.set
set("t", "<esc>", [[<C-\><C-n>]], opts)
set("t", "jk", [[<C-\><C-n>]], opts)
set("t", "<C-h>", [[<Cmd>wincmd h<CR>]], opts)
set("t", "<C-j>", [[<Cmd>wincmd j<CR>]], opts)
set("t", "<C-k>", [[<Cmd>wincmd k<CR>]], opts)
set("t", "<C-l>", [[<Cmd>wincmd l<CR>]], opts)
set("t", "<C-w>", [[<C-\><C-n><C-w>]], opts)
end
vim.cmd("autocmd! TermOpen term://*toggleterm#* lua set_terminal_keymaps()")
-- Theme
vim.cmd [[colorscheme tokyonight]]