add plugins

This commit is contained in:
Noah Håkansson 2024-02-13 17:11:07 +01:00
parent 51548cf6bf
commit 5e258dca31
5 changed files with 87 additions and 39 deletions

View file

@ -1,33 +1,33 @@
local M = {
'NvChad/nvim-colorizer.lua',
lazy = true,
event = 'VeryLazy',
event = 'BufRead',
}
function M.config()
require('colorizer').setup({
filetypes = { '*' },
user_default_options = {
RGB = true, -- #RGB hex codes #ABC
RRGGBB = true, -- #RRGGBB hex codes #777AAA
names = true, -- "Name" codes like Blue or blue
RRGGBBAA = false, -- #RRGGBBAA hex codes
AARRGGBB = false, -- 0xAARRGGBB hex codes
rgb_fn = true, -- CSS rgb() and rgba() functions
hsl_fn = true, -- CSS hsl() and hsla() functions
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
RGB = true, -- #RGB hex codes #ABC
RRGGBB = true, -- #RRGGBB hex codes #777AAA
names = true, -- "Name" codes like Blue or blue
RRGGBBAA = false, -- #RRGGBBAA hex codes
AARRGGBB = false, -- 0xAARRGGBB hex codes
rgb_fn = true, -- CSS rgb() and rgba() functions
hsl_fn = true, -- CSS hsl() and hsla() functions
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
-- Available modes for `mode`: foreground, background, virtualtext
mode = 'background', -- Set the display mode.
-- Available methods are false / true / "normal" / "lsp" / "both"
-- True is same as normal
tailwind = true, -- Enable tailwind colors
tailwind = true, -- Enable tailwind colors
-- parsers can contain values used in |user_default_options|
sass = { enable = false, parsers = { 'css' } }, -- Enable sass colors
sass = { enable = true, parsers = { 'css' } }, -- Enable sass colors
virtualtext = '',
-- update color values even if buffer is not focused
-- example use: cmp_menu, cmp_docs
always_update = false,
always_update = true,
},
-- all the sub-options of filetypes apply to buftypes
buftypes = {},

View file

@ -0,0 +1,7 @@
local M = {
'akinsho/git-conflict.nvim',
version = '*',
config = true,
}
return M

View file

@ -0,0 +1,40 @@
local M = {
'stevearc/oil.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
}
function M.config()
require('oil').setup({
float = {
max_height = 30,
max_width = 120,
},
keymaps = {
['g?'] = 'actions.show_help',
['<CR>'] = 'actions.select',
['<C-v>'] = 'actions.select_vsplit',
['<C-h>'] = 'actions.select_split',
['<C-t>'] = 'actions.select_tab',
['<C-p>'] = 'actions.preview',
['q'] = 'actions.close',
['<C-r>'] = 'actions.refresh',
['<BS>'] = 'actions.parent',
['_'] = 'actions.open_cwd',
-- ['`'] = 'actions.cd',
-- ['~'] = 'actions.tcd',
['`'] = 'false',
['~'] = 'false',
['gs'] = 'actions.change_sort',
['gx'] = 'actions.open_external',
['g.'] = 'actions.toggle_hidden',
-- ['g\\'] = 'actions.toggle_trash',
['g\\'] = 'false',
},
view_options = {
show_hidden = true,
},
})
vim.keymap.set('n', '<BS>', '<CMD>Oil --float<CR>', { desc = 'Open parent directory' })
end
return M

View file

@ -10,27 +10,27 @@ local M = {
function M.config()
require('persisted').setup({
save_dir = vim.fn.expand(vim.fn.stdpath('data') .. '/sessions/'), -- directory where session files are saved: Resolves to ~/.local/share/lvim/sessions/
silent = false, -- silent nvim message when sourcing session file
use_git_branch = true, -- create session files based on the branch of the git enabled repository
autosave = true, -- automatically save session files when exiting Neovim
should_autosave = function() -- function to determine if a session should be autosaved
silent = false, -- silent nvim message when sourcing session file
use_git_branch = true, -- create session files based on the branch of the git enabled repository
autosave = true, -- automatically save session files when exiting Neovim
should_autosave = function() -- function to determine if a session should be autosaved
-- do not autosave if the current filetype is ""(empty buffer), NvimTree or alpha
if vim.bo.filetype == '' or vim.bo.filetype == 'NvimTree' or vim.bo.filetype == 'alpha' then
return false
end
return true
end,
autoload = true, -- automatically load the session for the cwd on Neovim startup
autoload = true, -- automatically load the session for the cwd on Neovim startup
on_autoload_no_session = function() -- function to run when `autoload = true` but there is no session to load
end,
follow_cwd = true, -- change session file name to match current working directory if it changes
follow_cwd = true, -- change session file name to match current working directory if it changes
allowed_dirs = {
'~/Flexfiles',
'~/projects',
'~/work',
}, -- table of dirs that the plugin will auto-save and auto-load from
ignored_dirs = nil, -- table of dirs that are ignored when auto-saving and auto-loading
telescope = { -- options for the telescope extension
}, -- table of dirs that the plugin will auto-save and auto-load from
ignored_dirs = nil, -- table of dirs that are ignored when auto-saving and auto-loading
telescope = { -- options for the telescope extension
reset_prompt_after_deletion = true, -- whether to reset prompt after session deleted
},
})