nvim/init.lua
2024-04-15 07:18:48 +02:00

48 lines
1.2 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 opts = {}
-- Runs plugins --
require("lazy").setup("plugins") -- 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? --
vim.keymap.set('n', '<C-m>', ':Neotree filesystem toggle left<CR>', {})