Skip to content

Commit

Permalink
🔧 split plugins to files
Browse files Browse the repository at this point in the history
  • Loading branch information
ras0q committed Dec 10, 2023
1 parent 32835bf commit 9033fb3
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 78 deletions.
16 changes: 15 additions & 1 deletion common/config/nvim/init.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
require "autocmds"
require "keymaps"
require "options"
require "plugins"

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("lazy").setup("plugins")
77 changes: 0 additions & 77 deletions common/config/nvim/lua/plugins.lua

This file was deleted.

6 changes: 6 additions & 0 deletions common/config/nvim/lua/plugins/catppuccin.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
return {
"catppuccin/nvim",
name = "catppuccin",
priority = 1000,
config = function() vim.cmd.colorscheme "catppuccin-latte" end,
}
11 changes: 11 additions & 0 deletions common/config/nvim/lua/plugins/mini.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
return {
"echasnovski/mini.nvim",
config = function()
require("mini.completion").setup()
require("mini.cursorword").setup()
require("mini.indentscope").setup()
require("mini.pairs").setup()
require("mini.statusline").setup()
require("mini.trailspace").setup()
end,
}
7 changes: 7 additions & 0 deletions common/config/nvim/lua/plugins/nvim-tree.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
return {
"nvim-tree/nvim-tree.lua",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
require("nvim-tree").setup {}
end,
}
11 changes: 11 additions & 0 deletions common/config/nvim/lua/plugins/nvim-treesitter.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
require "nvim-treesitter.install".prefer_git = false
require "nvim-treesitter.configs".setup {
highlight = { enable = true },
indent = { enable = true },
}
end,
}
27 changes: 27 additions & 0 deletions common/config/nvim/lua/plugins/telescope.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
return {
"nvim-telescope/telescope.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
{
"nvim-telescope/telescope-file-browser.nvim",
config = function()
require("telescope").load_extension("file_browser")
end,
},
},
config = function()
require("telescope").setup {
pickers = {
find_files = {
-- show dotfiles
find_command = { "rg", "--files", "--hidden", "-g", "!.git" }
}
}
}
local builtin = require("telescope.builtin")
-- find files
vim.keymap.set("n", "<leader>ff", builtin.find_files, {})
-- search for a string
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
end,
}

0 comments on commit 9033fb3

Please sign in to comment.