62 lines
2.1 KiB
Lua
62 lines
2.1 KiB
Lua
-- Tab
|
|
vim.opt.tabstop = 2 -- number of visual spaces per TAB
|
|
vim.opt.softtabstop = 2 -- number of spacesin tab when editing
|
|
vim.opt.shiftwidth = 2 -- insert 4 spaces on a tab
|
|
vim.opt.expandtab = true -- tabs are spaces, mainly because of python
|
|
|
|
-- UI config
|
|
vim.opt.number = true -- show absolute number
|
|
vim.opt.relativenumber = true -- add numbers to each line on the left side
|
|
vim.opt.splitbelow = true -- open new vertical split bottom
|
|
vim.opt.splitright = true -- open new horizontal splits right
|
|
-- vim.opt.termguicolors = true -- enabl 24-bit RGB color in the TUI
|
|
vim.opt.showmode = false -- we are experienced, wo don't need the "-- INSERT --" mode hint
|
|
|
|
-- Searching
|
|
vim.opt.incsearch = true -- search as characters are entered
|
|
vim.opt.hlsearch = false -- do not highlight matches
|
|
vim.opt.ignorecase = true -- ignore case in searches by default
|
|
vim.opt.smartcase = true -- but make it case sensitive if an uppercase is entered
|
|
|
|
-- -- Keybinds
|
|
vim.keymap.set('n', '<C-h>', '<C-w>h', opts)
|
|
vim.keymap.set('n', '<C-j>', '<C-w>j', opts)
|
|
vim.keymap.set('n', '<C-k>', '<C-w>k', opts)
|
|
vim.keymap.set('n', '<C-l>', '<C-w>l', opts)
|
|
|
|
-- Resize with arrows
|
|
-- delta: 2 lines
|
|
vim.keymap.set('n', '<C-Up>', ':resize -2<CR>', opts)
|
|
vim.keymap.set('n', '<C-Down>', ':resize +2<CR>', opts)
|
|
vim.keymap.set('n', '<C-Left>', ':vertical resize -2<CR>', opts)
|
|
vim.keymap.set('n', '<C-Right>', ':vertical resize +2<CR>', opts)
|
|
|
|
-- Telescope binds
|
|
vim.keymap.set("n", "<space>fb", ":Telescope file_browser<CR>")
|
|
|
|
|
|
vim.keymap.set('i', 'jk', '<Esc>', opts)
|
|
|
|
-- Lazy
|
|
require("config.lazy")
|
|
require("flutter-tools").setup {} -- use defaults
|
|
require("catppuccin").setup({
|
|
integrations = {
|
|
cmp = false,
|
|
gitsigns = true,
|
|
nvimtree = true,
|
|
treesitter = true,
|
|
notify = false,
|
|
mini = {
|
|
enabled = false,
|
|
indentscope_color = "",
|
|
},
|
|
}
|
|
})
|
|
|
|
-- css colors
|
|
vim.opt.termguicolors = true
|
|
require('nvim-highlight-colors').setup({})
|
|
|
|
vim.cmd.colorscheme "catppuccin"
|