Skip to content

Commit

Permalink
Multiple changes:
Browse files Browse the repository at this point in the history
1. Enable custom plugins
  - add nvim tree
2. Enable custom options
  • Loading branch information
scottkimGit committed Jul 8, 2024
1 parent 5aeddfd commit a98e958
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 2 deletions.
8 changes: 7 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ vim.opt.cursorline = true
-- Minimal number of screen lines to keep above and below the cursor.
vim.opt.scrolloff = 10

-- [[ Load custom options ]]
require 'options'

-- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()`

Expand Down Expand Up @@ -359,6 +362,9 @@ require('lazy').setup({
-- },
-- },
-- pickers = {}
defaults = {
file_ignore_patterns = { '__pycache__/*' },
},
extensions = {
['ui-select'] = {
require('telescope.themes').get_dropdown(),
Expand Down Expand Up @@ -885,7 +891,7 @@ require('lazy').setup({
--
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
-- { import = 'custom.plugins' },
{ import = 'custom.plugins' },
}, {
ui = {
-- If you are using a Nerd Font: set icons to an empty table which will use the
Expand Down
53 changes: 52 additions & 1 deletion lua/custom/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,55 @@
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
return {}
return {
-- Nvim-tree
{
'nvim-tree/nvim-tree.lua',
version = '*',
lazy = false,
dependencies = {
'nvim-tree/nvim-web-devicons',
},
config = function()
local nvimtree = require 'nvim-tree'

-- recommended settings from nvim-tree documentation
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1

nvimtree.setup {
view = {
width = 35,
relativenumber = true,
},
renderer = {
indent_markers = {
enable = true,
},
},
-- disable window_picker for
-- explorer to work well with
-- window splits
actions = {
open_file = {
window_picker = {
enable = false,
},
},
},
filters = {
custom = { '.DS_Store' },
},
git = {
ignore = false,
},
}

local keymap = vim.keymap
keymap.set('n', '<leader>ee', '<cmd>NvimTreeToggle<CR>', { desc = 'Toggle file explorer' })
keymap.set('n', '<leader>ef', '<cmd>NvimTreeFindFileToggle<CR>', { desc = 'Toggle file explorer' })
keymap.set('n', '<leader>ec', '<cmd>NvimTreeCollapse<CR>', { desc = 'Collapse file explorer' })
keymap.set('n', '<leader>er', '<cmd>NvimTreeRefresh<CR>', { desc = 'Refresh file explorer' })
end,
},
}
4 changes: 4 additions & 0 deletions lua/options.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
vim.opt.expandtab = true
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.softtabstop = 4

0 comments on commit a98e958

Please sign in to comment.