First set of plugins

* telescope
* colorscheme
* neotree
* lualine
* treesitter (seems to be broken)
This commit is contained in:
William McVicar
2024-01-05 00:43:09 +01:00
parent 67ce40e767
commit b1c702054c
8 changed files with 79 additions and 0 deletions

15
nvim/init.lua Normal file
View File

@@ -0,0 +1,15 @@
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)
require("settings")
require("lazy").setup("plugins")

View File

@@ -0,0 +1,9 @@
return {
"catppuccin/nvim",
lazy = false,
name = "catppuccin",
priority = 1000,
config = function()
vim.cmd.colorscheme "catppuccin"
end
}

View File

@@ -0,0 +1,10 @@
return {
"nvim-lualine/lualine.nvim",
config = function()
require('lualine').setup({
options = {
theme = 'catppuccin'
}
})
end
}

View File

@@ -0,0 +1,12 @@
return {
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
config = function()
vim.keymap.set('n', '<leader>p', ':Neotree filesystem reveal left<CR>', {})
end
}

View File

@@ -0,0 +1,10 @@
return {
'nvim-telescope/telescope.nvim', tag = '0.1.5',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
local builtin = require("telescope.builtin")
vim.keymap.set('n', '<C-S-o>', builtin.find_files, {})
vim.keymap.set('n', '<C-S-s>', builtin.live_grep, {})
end
}

View File

@@ -0,0 +1,14 @@
return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = { "c", "cpp", "lua", "vim", "vimdoc", "cmake" },
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
})
end
}

8
nvim/lua/settings.lua Normal file
View File

@@ -0,0 +1,8 @@
vim.cmd("syntax on")
vim.cmd("set expandtab")
vim.cmd("set tabstop=4")
vim.cmd("set softtabstop=4")
vim.cmd("set shiftwidth=4")
vim.g.mapleader = " "