mirror of
https://github.com/hyzendust/KickestEnd.nvim.git
synced 2026-02-15 03:41:14 +01:00
modified: init.lua
new file: lazy-lock.json new file: lua/custom/plugins/filetree.lua
This commit is contained in:
94
init.lua
94
init.lua
@@ -1,49 +1,5 @@
|
||||
--[[
|
||||
|
||||
=====================================================================
|
||||
==================== READ THIS BEFORE CONTINUING ====================
|
||||
=====================================================================
|
||||
|
||||
Kickstart.nvim is *not* a distribution.
|
||||
|
||||
Kickstart.nvim is a template for your own configuration.
|
||||
The goal is that you can read every line of code, top-to-bottom, understand
|
||||
what your configuration is doing, and modify it to suit your needs.
|
||||
|
||||
Once you've done that, you should start exploring, configuring and tinkering to
|
||||
explore Neovim!
|
||||
|
||||
If you don't know anything about Lua, I recommend taking some time to read through
|
||||
a guide. One possible example:
|
||||
- https://learnxinyminutes.com/docs/lua/
|
||||
|
||||
|
||||
And then you can explore or search through `:help lua-guide`
|
||||
- https://neovim.io/doc/user/lua-guide.html
|
||||
|
||||
|
||||
Kickstart Guide:
|
||||
|
||||
I have left several `:help X` comments throughout the init.lua
|
||||
You should run that command and read that help section for more information.
|
||||
|
||||
In addition, I have some `NOTE:` items throughout the file.
|
||||
These are for you, the reader to help understand what is happening. Feel free to delete
|
||||
them once you know what you're doing, but they should serve as a guide for when you
|
||||
are first encountering a few different constructs in your nvim config.
|
||||
|
||||
I hope you enjoy your Neovim journey,
|
||||
- TJ
|
||||
|
||||
P.S. You can delete this when you're done too. It's your config now :)
|
||||
--]]
|
||||
|
||||
-- Set <space> as the leader key
|
||||
-- See `:help mapleader`
|
||||
-- NOTE: Must happen before plugins are required (otherwise wrong leader will be used)
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
|
||||
-- [[ Install `lazy.nvim` plugin manager ]]
|
||||
-- https://github.com/folke/lazy.nvim
|
||||
-- `:help lazy.nvim.txt` for more info
|
||||
@@ -68,7 +24,6 @@ vim.opt.rtp:prepend(lazypath)
|
||||
-- as they will be available in your neovim runtime.
|
||||
require('lazy').setup({
|
||||
-- NOTE: First, some plugins that don't require any configuration
|
||||
|
||||
-- Git related plugins
|
||||
'tpope/vim-fugitive',
|
||||
'tpope/vim-rhubarb',
|
||||
@@ -94,7 +49,6 @@ require('lazy').setup({
|
||||
'folke/neodev.nvim',
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
-- Autocompletion
|
||||
'hrsh7th/nvim-cmp',
|
||||
@@ -108,12 +62,12 @@ require('lazy').setup({
|
||||
'hrsh7th/cmp-path',
|
||||
|
||||
-- Adds a number of user-friendly snippets
|
||||
|
||||
'rafamadriz/friendly-snippets',
|
||||
},
|
||||
},
|
||||
|
||||
-- Useful plugin to show you pending keybinds.
|
||||
{ 'folke/which-key.nvim', opts = {} },
|
||||
{ 'folke/which-key.nvim', opts = {} },
|
||||
{
|
||||
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||
'lewis6991/gitsigns.nvim',
|
||||
@@ -188,14 +142,10 @@ require('lazy').setup({
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
-- Theme inspired by Atom
|
||||
'navarasu/onedark.nvim',
|
||||
priority = 1000,
|
||||
config = function()
|
||||
vim.cmd.colorscheme 'onedark'
|
||||
end,
|
||||
-- Theme
|
||||
vim.cmd [[colorscheme lunaperche]]
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
@@ -205,13 +155,11 @@ require('lazy').setup({
|
||||
opts = {
|
||||
options = {
|
||||
icons_enabled = false,
|
||||
theme = 'onedark',
|
||||
component_separators = '|',
|
||||
section_separators = '',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
-- Add indentation guides even on blank lines
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
@@ -257,8 +205,8 @@ require('lazy').setup({
|
||||
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
|
||||
-- These are some example plugins that I've included in the kickstart repository.
|
||||
-- Uncomment any of the lines below to enable them.
|
||||
-- require 'kickstart.plugins.autoformat',
|
||||
-- require 'kickstart.plugins.debug',
|
||||
require 'kickstart.plugins.autoformat',
|
||||
--require 'kickstart.plugins.debug'
|
||||
|
||||
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||
-- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping
|
||||
@@ -266,7 +214,7 @@ require('lazy').setup({
|
||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||
--
|
||||
-- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins
|
||||
-- { import = 'custom.plugins' },
|
||||
{ import = 'custom.plugins' },
|
||||
}, {})
|
||||
|
||||
-- [[ Setting options ]]
|
||||
@@ -280,12 +228,12 @@ vim.o.hlsearch = false
|
||||
vim.wo.number = true
|
||||
|
||||
-- Enable mouse mode
|
||||
vim.o.mouse = 'a'
|
||||
vim.o.mouse = ''
|
||||
|
||||
-- Sync clipboard between OS and Neovim.
|
||||
-- Remove this option if you want your OS clipboard to remain independent.
|
||||
-- See `:help 'clipboard'`
|
||||
vim.o.clipboard = 'unnamedplus'
|
||||
-- vim.o.clipboard = 'unnamedplus'
|
||||
|
||||
-- Enable break indent
|
||||
vim.o.breakindent = true
|
||||
@@ -326,6 +274,28 @@ vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnos
|
||||
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
|
||||
|
||||
|
||||
--[[ Custom keymaps ]]
|
||||
|
||||
--NeoTree
|
||||
vim.keymap.set('n', '<leader>n', '<Cmd>Neotree toggle<CR>')
|
||||
|
||||
--Terminal open in new tab
|
||||
vim.keymap.set('n', '<leader>t', '<Cmd>tabnew +term<CR>i')
|
||||
|
||||
--Close current window
|
||||
vim.keymap.set('n', '<leader>x', '<Cmd>q<CR>')
|
||||
|
||||
--Save current buffer
|
||||
vim.keymap.set('n', '<leader>w', '<Cmd>w<CR>')
|
||||
|
||||
--Switch below/right split windows
|
||||
vim.keymap.set('n', '<leader><Tab>', '<C-W><C-W>')
|
||||
|
||||
--Switch above/left split windows
|
||||
vim.keymap.set('n', '<Tab>', '<C-W>W')
|
||||
|
||||
|
||||
-- [[ Highlight on yank ]]
|
||||
-- See `:help vim.highlight.on_yank()`
|
||||
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
||||
|
||||
Reference in New Issue
Block a user