Skip to content

Commit db88264

Browse files
Adding oil.lua and theme.lua plugins
1 parent 43ab459 commit db88264

File tree

3 files changed

+64
-23
lines changed

3 files changed

+64
-23
lines changed

init.lua

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
164164
-- Diagnostic keymaps
165165
vim.keymap.set('n', '<leader>qq', '<CMD>q!<CR>', { desc = 'Quit all without close' })
166166
vim.keymap.set('n', '<C-s>', '<CMD>w<CR>', { desc = 'Save a file' })
167-
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' })
167+
vim.keymap.set('n', '<leader>e', '<CMD>Oil<CR>', { desc = 'Open folder structure with Oil' })
168+
vim.keymap.set('n', '<leader>E', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' })
168169
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
169170

170171
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
@@ -221,6 +222,7 @@ vim.cmd 'set expandtab'
221222
vim.cmd 'set tabstop=2'
222223
vim.cmd 'set softtabstop=2'
223224
vim.cmd 'set shiftwidth=2'
225+
224226
--
225227
require('lazy').setup({
226228
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
@@ -804,27 +806,27 @@ require('lazy').setup({
804806
end,
805807
},
806808

807-
{ -- You can easily change to a different colorscheme.
808-
-- Change the name of the colorscheme plugin below, and then
809-
-- change the command in the config to whatever the name of that colorscheme is.
810-
--
811-
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
812-
'folke/tokyonight.nvim',
813-
priority = 1000, -- Make sure to load this before all the other start plugins.
814-
opts = {
815-
transparent = true,
816-
},
817-
818-
init = function()
819-
-- Load the colorscheme here.
820-
-- Like many other themes, this one has different styles, and you could load
821-
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
822-
vim.cmd.colorscheme 'tokyonight-night'
823-
824-
-- You can configure highlights by doing something like:
825-
vim.cmd.hi 'Comment gui=none'
826-
end,
827-
},
809+
-- { -- You can easily change to a different colorscheme.
810+
-- Change the name of the colorscheme plugin below, and then
811+
-- change the command in the config to whatever the name of that colorscheme is.
812+
--
813+
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
814+
-- 'folke/tokyonight.nvim',
815+
-- priority = 1000, -- Make sure to load this before all the other start plugins.
816+
-- opts = {
817+
-- transparent = true,
818+
-- },
819+
820+
-- init = function()
821+
-- Load the colorscheme here.
822+
-- Like many other themes, this one has different styles, and you could load
823+
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
824+
-- vim.cmd.colorscheme 'tokyonight-night'
825+
826+
-- You can configure highlights by doing something like:
827+
-- vim.cmd.hi 'Comment gui=none'
828+
-- end,
829+
-- },
828830

829831
-- Highlight todo, notes, etc in comments
830832
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
@@ -933,7 +935,7 @@ require('lazy').setup({
933935
--
934936
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
935937
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
936-
-- { import = 'custom.plugins' },
938+
{ import = 'custom.plugins' },
937939
}, {
938940
ui = {
939941
-- If you are using a Nerd Font: set icons to an empty table which will use the
@@ -956,5 +958,6 @@ require('lazy').setup({
956958
},
957959
})
958960

961+
vim.cmd.colorscheme 'catppuccin'
959962
-- The line beneath this is called `modeline`. See `:help modeline`
960963
-- vim: ts=2 sts=2 sw=2 et

lua/custom/plugins/oil.lua

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
return {
2+
{
3+
'stevearc/oil.nvim',
4+
opts = {},
5+
-- Optional dependencies
6+
dependencies = { 'nvim-tree/nvim-web-devicons' },
7+
8+
config = function()
9+
require('oil').setup {
10+
default_file_explorer = true,
11+
}
12+
13+
vim.keymap.set('n', '<leader>e', '<CMD>Oil<CR>', { desc = 'Open folder structure with Oil' })
14+
end,
15+
},
16+
}

lua/custom/plugins/themes.lua

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
return {
2+
{
3+
'catppuccin/nvim',
4+
name = 'catppuccin',
5+
priority = 1000,
6+
opts = {
7+
flavour = 'macchiato',
8+
transparent_background = true,
9+
term_colors = true,
10+
custom_highlights = function(colors)
11+
return {
12+
Comment = { fg = colors.subtext1 },
13+
TabLineSel = { bg = colors.teal },
14+
CmpBorder = { fg = colors.surface2 },
15+
StatusLine = { fg = colors.blue },
16+
GetFile = { fg = colors.blue },
17+
}
18+
end,
19+
},
20+
},
21+
{ 'folke/tokyonight.nvim', name = 'tokyonight', priority = 1000, opts = { transparent = true } },
22+
}

0 commit comments

Comments
 (0)