nvim/init.lua
2024-04-14 22:33:01 +02:00

57 lines
1.4 KiB
Lua

-- Chechs for instal of lazy.nvim (plugin manager) in not found installs it --
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
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", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- Configuration of plugins --
local plugins = {
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 }, -- colour scheme --
{'nvim-telescope/telescope.nvim', tag = '0.1.6', -- fuzzy finder (telescope) --
dependencies = { 'nvim-lua/plenary.nvim' }},
{"nvim-treesitter/nvim-treesitter", build = ":TSUpdate"}, -- tree sitter --
}
local opts = {}
-- Runs plugins --
require("lazy").setup(plugins, opts) -- packet manager --
local builtin = require("telescope.builtin") -- fuzzy finder --
local config = require("nvim-treesitter.configs") -- tree sitter plugin config for langs --
config.setup({
ensure_installed = {
"lua", "python",
"javascript", "html", "css",
"markdown",
},
highlight = { enable = true },
indent = { enable = true },
})
require("catppuccin").setup(plugins, opts) -- color scheme --
vim.cmd.colorscheme "catppuccin"
-- Keypams --
vim.keymap.set('n', '<C-p>', builtin.find_files, {}) -- telescope find --
-- vim.keymap.set('n', '<C-o>', builtin.live_grep, {}) -- I dont know what this is doing? --