cleaned up the config some

This commit is contained in:
Travis Opperud 2024-07-13 16:04:25 -05:00
parent 96add0cf96
commit f328a7e2f5
4 changed files with 39 additions and 9 deletions

View File

@ -339,25 +339,23 @@ require('lazy').setup({
}, },
}) })
-- I should put this somewhere else later, but this allows for collapsing folds. -- I should put all this config somewhere else later
-- this allows for collapsing folds.
vim.opt.foldmethod = 'expr' vim.opt.foldmethod = 'expr'
vim.opt.foldexpr = 'nvim_treesitter#foldexpr()' vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
vim.opt.foldlevelstart = 99 vim.opt.foldlevelstart = 99
-- relative line numbers and line numbers
vim.opt.nu = true vim.opt.nu = true
vim.opt.relativenumber = true vim.opt.relativenumber = true
-- tabbing options
vim.opt.tabstop = 4 vim.opt.tabstop = 4
vim.opt.softtabstop = 4 vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4 vim.opt.shiftwidth = 4
vim.opt.expandtab = true vim.opt.expandtab = true
vim.opt.smartindent = true vim.opt.smartindent = true
-- this is transparent background
vim.api.nvim_set_hl(0, 'Normal', { bg = 'none' }) vim.api.nvim_set_hl(0, 'Normal', { bg = 'none' })
vim.api.nvim_set_hl(0, 'NormalFloat', { bg = 'none' }) vim.api.nvim_set_hl(0, 'NormalFloat', { bg = 'none' })
vim.keymap.set('n', '<leader>dt', ':DocsViewToggle<enter>', { desc = 'Toggle Documentation' })
vim.keymap.set('n', '-', '<CMD>Oil<CR>', { desc = 'Open parent directory' })
-- The line beneath this is called `modeline`. See `:help modeline` -- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et -- vim: ts=2 sts=2 sw=2 et

View File

@ -1,6 +1,30 @@
return { return {
'stevearc/oil.nvim', 'stevearc/oil.nvim',
opts = {}, opts = {
columns = {
'icon',
-- "permissions",
'size',
'mtime',
},
},
keymaps = {
['g?'] = 'actions.show_help',
['<CR>'] = 'actions.select',
['<C-s>'] = { 'actions.select', opts = { vertical = true }, desc = 'Open the entry in a vertical split' },
['<C-t>'] = { 'actions.select', opts = { tab = true }, desc = 'Open the entry in new tab' },
['<C-p>'] = 'actions.preview',
['<C-c>'] = 'actions.close',
['-'] = 'actions.parent',
['_'] = 'actions.open_cwd',
['`'] = 'actions.cd',
['~'] = { 'actions.cd', opts = { scope = 'tab' }, desc = ':tcd to the current oil directory' },
['gs'] = 'actions.change_sort',
['gx'] = 'actions.open_external',
['g.'] = 'actions.toggle_hidden',
['g\\'] = 'actions.toggle_trash',
},
use_default_keymaps = false,
-- Optional dependencies -- Optional dependencies
dependencies = { 'echasnovski/mini.icons' }, dependencies = { 'echasnovski/mini.icons' },
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if prefer nvim-web-devicons -- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if prefer nvim-web-devicons

View File

@ -6,4 +6,12 @@ return {
position = 'right', position = 'right',
width = 60, width = 60,
}, },
keys = {
{
'<leader>dt',
':DocsViewToggle<enter>',
desc = 'Toggle Documentation',
mode = { 'n' },
},
},
} }

View File

@ -35,7 +35,7 @@ return {
-- lint.linters_by_ft['inko'] = nil -- lint.linters_by_ft['inko'] = nil
-- lint.linters_by_ft['janet'] = nil -- lint.linters_by_ft['janet'] = nil
-- lint.linters_by_ft['json'] = nil -- lint.linters_by_ft['json'] = nil
-- lint.linters_by_ft['markdown'] = nil lint.linters_by_ft['markdown'] = nil
-- lint.linters_by_ft['rst'] = nil -- lint.linters_by_ft['rst'] = nil
-- lint.linters_by_ft['ruby'] = nil -- lint.linters_by_ft['ruby'] = nil
-- lint.linters_by_ft['terraform'] = nil -- lint.linters_by_ft['terraform'] = nil