Move default settings into module. Move neotree into plugins. Add new mappings
This commit is contained in:
parent
c96aae7572
commit
7f49d1d675
4 changed files with 131 additions and 102 deletions
|
|
@ -1,24 +0,0 @@
|
|||
-- Unless you are still migrating, remove the deprecated commands from v1.x
|
||||
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
|
||||
|
||||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
version = "*",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
config = function()
|
||||
require('neo-tree').setup {
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
visible = false,
|
||||
hide_dotfiles = false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
vim.keymap.set('n', '<leader><space>', ':Neotree toggle<cr>', { desc = '(nvim-tree) File tree' })
|
||||
end,
|
||||
}
|
||||
43
lua/editor-settings.lua
Normal file
43
lua/editor-settings.lua
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
-- [[ Setting options ]]
|
||||
-- See `:help vim.o`
|
||||
-- NOTE: You can change these options as you wish!
|
||||
|
||||
-- Disale Swap Files
|
||||
vim.opt.swapfile = false
|
||||
|
||||
-- Set highlight on search
|
||||
vim.o.hlsearch = true
|
||||
|
||||
-- Make line numbers default
|
||||
vim.wo.number = true
|
||||
|
||||
-- Enable mouse mode
|
||||
vim.o.mouse = 'a'
|
||||
|
||||
-- Sync clipboard between OS and Neovim.
|
||||
vim.o.clipboard = 'unnamedplus'
|
||||
|
||||
-- Enable break indent
|
||||
vim.o.breakindent = true
|
||||
|
||||
-- Save undo history
|
||||
vim.o.undofile = true
|
||||
|
||||
-- Case-insensitive searching UNLESS \C or capital in search
|
||||
vim.o.ignorecase = true
|
||||
vim.o.smartcase = true
|
||||
|
||||
-- Keep signcolumn on by default
|
||||
vim.wo.signcolumn = 'yes'
|
||||
|
||||
-- Decrease update time
|
||||
vim.o.updatetime = 250
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
|
||||
-- Set completeopt to have a better completion experience
|
||||
vim.o.completeopt = 'menuone,noselect'
|
||||
|
||||
-- NOTE: You should make sure your terminal supports this
|
||||
vim.o.termguicolors = true
|
||||
|
||||
|
|
@ -56,26 +56,6 @@ local plugins = {
|
|||
'folke/which-key.nvim',
|
||||
opts = {}
|
||||
},
|
||||
{
|
||||
-- Adds git releated signs to the gutter, as well as utilities for managing changes
|
||||
'lewis6991/gitsigns.nvim',
|
||||
opts = {
|
||||
-- See `:help gitsigns.txt`
|
||||
signs = {
|
||||
add = { text = '+' },
|
||||
change = { text = '~' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
},
|
||||
on_attach = function(bufnr)
|
||||
vim.keymap.set('n', '<leader>gp', require('gitsigns').prev_hunk,
|
||||
{ buffer = bufnr, desc = '[G]o to [P]revious Hunk' })
|
||||
vim.keymap.set('n', '<leader>gn', require('gitsigns').next_hunk, { buffer = bufnr, desc = '[G]o to [N]ext Hunk' })
|
||||
vim.keymap.set('n', '<leader>ph', require('gitsigns').preview_hunk, { buffer = bufnr, desc = '[P]review [H]unk' })
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
-- Theme inspired by Atom
|
||||
|
|
@ -142,6 +122,32 @@ local plugins = {
|
|||
build = ':TSUpdate',
|
||||
},
|
||||
|
||||
-- Neo Tree
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
config = function()
|
||||
require('neo-tree').setup {
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
visible = false,
|
||||
hide_dotfiles = false,
|
||||
}
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"mg979/vim-visual-multi",
|
||||
branch = "master"
|
||||
},
|
||||
|
||||
require 'kickstart.plugins.autoformat',
|
||||
-- require 'kickstart.plugins.debug',
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue