Add more colorscheme and ability to switch
This commit is contained in:
@ -1,12 +1,19 @@
|
||||
local keymap = vim.keymap
|
||||
|
||||
-- Save & quit
|
||||
vim.keymap.set("n", "<leader>w", ":w<CR>")
|
||||
vim.keymap.set("n", "<leader>q", ":q<CR>")
|
||||
keymap.set("n", "<leader>w", ":w<CR>")
|
||||
keymap.set("n", "<leader>q", ":q<CR>")
|
||||
|
||||
-- Clear search highlight
|
||||
vim.keymap.set("n", "<leader>h", ":nohlsearch<CR>")
|
||||
keymap.set("n", "<leader>h", ":nohlsearch<CR>")
|
||||
|
||||
-- Better window navigation
|
||||
vim.keymap.set("n", "<C-h>", "<C-w>h")
|
||||
vim.keymap.set("n", "<C-j>", "<C-w>j")
|
||||
vim.keymap.set("n", "<C-k>", "<C-w>k")
|
||||
vim.keymap.set("n", "<C-l>", "<C-w>l")
|
||||
keymap.set("n", "<C-h>", "<C-w>h")
|
||||
keymap.set("n", "<C-j>", "<C-w>j")
|
||||
keymap.set("n", "<C-k>", "<C-w>k")
|
||||
keymap.set("n", "<C-l>", "<C-w>l")
|
||||
|
||||
-- Colorscheme
|
||||
local utils = require("utils.colorscheme")
|
||||
|
||||
keymap.set("n", "<leader>cs", utils.pick, { desc = "Pick colorscheme" })
|
||||
|
||||
@ -18,9 +18,9 @@ vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Initialize lazy.nvim
|
||||
local plugins = {
|
||||
require("plugins.tokyonight"), -- theme
|
||||
require("plugins.treesitter"), -- syntax tree
|
||||
require("plugins.colorschemes"), -- theme
|
||||
require("plugins.telescope"), -- fuzzy finder
|
||||
require("plugins.treesitter"), -- syntax tree
|
||||
}
|
||||
|
||||
require("lazy").setup(plugins)
|
||||
|
||||
@ -1,30 +1,32 @@
|
||||
local opt = vim.opt
|
||||
|
||||
-- Line numbers
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
opt.number = true
|
||||
opt.relativenumber = true
|
||||
|
||||
-- Tabs & indentation
|
||||
vim.opt.tabstop = 4 -- number of spaces a tab counts for
|
||||
vim.opt.shiftwidth = 4 -- spaces for each indent
|
||||
vim.opt.expandtab = true -- convert tabs to spaces
|
||||
vim.opt.smartindent = true
|
||||
opt.tabstop = 4 -- number of spaces a tab counts for
|
||||
opt.shiftwidth = 4 -- spaces for each indent
|
||||
opt.expandtab = true -- convert tabs to spaces
|
||||
opt.smartindent = true
|
||||
|
||||
-- Searching
|
||||
vim.opt.ignorecase = true -- case-insensitive search...
|
||||
vim.opt.smartcase = true -- ...unless you use capitals
|
||||
vim.opt.hlsearch = true
|
||||
vim.opt.incsearch = true
|
||||
opt.ignorecase = true -- case-insensitive search...
|
||||
opt.smartcase = true -- ...unless you use capitals
|
||||
opt.hlsearch = true
|
||||
opt.incsearch = true
|
||||
|
||||
-- UI / UX
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.signcolumn = "yes" -- avoid text shifting
|
||||
vim.opt.wrap = false -- no line wrapping
|
||||
opt.termguicolors = true
|
||||
opt.cursorline = true
|
||||
opt.signcolumn = "yes" -- avoid text shifting
|
||||
opt.wrap = false -- no line wrapping
|
||||
|
||||
-- Behavior
|
||||
vim.opt.scrolloff = 8 -- keep lines above/below cursor
|
||||
vim.opt.sidescrolloff = 8
|
||||
vim.opt.updatetime = 300 -- faster diagnostics
|
||||
vim.opt.timeoutlen = 500 -- faster key sequences
|
||||
opt.scrolloff = 8 -- keep lines above/below cursor
|
||||
opt.sidescrolloff = 8
|
||||
opt.updatetime = 300 -- faster diagnostics
|
||||
opt.timeoutlen = 500 -- faster key sequences
|
||||
|
||||
-- Clipboard (use system clipboard)
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
opt.clipboard = "unnamedplus"
|
||||
|
||||
Reference in New Issue
Block a user