basic nvim config

This commit is contained in:
2026-03-20 11:20:21 +01:00
parent 89ba0219ab
commit 1e1ec3ac53
3 changed files with 63 additions and 1 deletions
+61
View File
@@ -0,0 +1,61 @@
-- Basics
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.smartindent = true
vim.g.mapleader = " "
-- Bootstrap lazy.nvim
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",
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- Load Plugins
local plugins = {
-- catppuccin: color scheme
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 },
-- telescope: fuzzy search
{ "nvim-telescope/telescope.nvim", tag = '0.1.5', dependencies = { "nvim-lua/plenary.nvim" } },
-- treesitter: code parser
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" }
}
local opts = {}
require("lazy").setup(plugins, opts)
-- telescope set up
local builtin = require("telescope.builtin")
vim.keymap.set('n', '<C-p>', builtin.find_files, {})
vim.keymap.set('n', '<leader>f', builtin.live_grep, {})
-- treesitter set up
local config = require("nvim-treesitter.config")
config.setup({
ensure_installed = {"python", "bash", "lua"},
highlight = { enable = true },
indent = { enable = true }
})
-- catppuccin set up
require("catppuccin").setup()
vim.cmd.colorscheme "catppuccin"