init.lua
This commit is contained in:
parent
de44f49101
commit
5ada6e2aa5
61
init.lua
61
init.lua
|
@ -86,12 +86,12 @@ 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 loaded (otherwise wrong leader will be used)
|
||||
-- NOTE: Must happen befonre plugins are loaded (otherwise wrong leader will be used)
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
|
||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
||||
vim.g.have_nerd_font = false
|
||||
vim.g.have_nerd_font = true
|
||||
|
||||
-- [[ Setting options ]]
|
||||
-- See `:help vim.opt`
|
||||
|
@ -237,7 +237,6 @@ require('lazy').setup({
|
|||
--
|
||||
-- Use `opts = {}` to force a plugin to be loaded.
|
||||
--
|
||||
|
||||
-- Here is a more advanced example where we pass configuration
|
||||
-- options to `gitsigns.nvim`. This is equivalent to the following Lua:
|
||||
-- require('gitsigns').setup({ ... })
|
||||
|
@ -256,20 +255,49 @@ require('lazy').setup({
|
|||
},
|
||||
},
|
||||
|
||||
-- NOTE: Plugins can also be configured to run Lua code when they are loaded.
|
||||
{
|
||||
'nvim-tree/nvim-tree.lua',
|
||||
version = '*',
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
},
|
||||
config = function()
|
||||
require('nvim-web-devicons').setup {}
|
||||
|
||||
require('nvim-tree').setup {
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
},
|
||||
git = {
|
||||
enable = true,
|
||||
ignore = false,
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
--
|
||||
-- This is often very useful to both group configuration, as well as handle
|
||||
-- lazy loading plugins that don't need to be loaded immediately at startup.
|
||||
--
|
||||
-- For example, in the following configuration, we use:
|
||||
-- event = 'VimEnter'
|
||||
--
|
||||
--{{{
|
||||
-- which loads which-key before all the UI elements are loaded. Events can be
|
||||
-- normal autocommands events (`:help autocmd-events`).
|
||||
--
|
||||
-- Then, because we use the `opts` key (recommended), the configuration runs
|
||||
-- after the plugin has been loaded as `require(MODULE).setup(opts)`.
|
||||
|
||||
--
|
||||
{
|
||||
'rose-pine/neovim',
|
||||
priority = 1000, -- Ensures this plugin is loaded before others (if needed)
|
||||
init = function()
|
||||
-- Load the colorscheme here
|
||||
vim.cmd.colorscheme 'rose-pine' -- Set the color scheme to 'tokyonight-day'
|
||||
-- Customize highlight groups
|
||||
vim.cmd.hi 'Comment gui=none' -- Set comment highlights
|
||||
end,
|
||||
},
|
||||
{ -- Useful plugin to show you pending keybinds.
|
||||
'folke/which-key.nvim',
|
||||
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
||||
|
@ -400,6 +428,8 @@ require('lazy').setup({
|
|||
|
||||
-- See `:help telescope.builtin`
|
||||
local builtin = require 'telescope.builtin'
|
||||
vim.keymap.set('n', '<leader>e', ':NvimTreeToggle<CR>', { desc = 'Toggle File Explorer' })
|
||||
|
||||
vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
|
||||
vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
|
||||
vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' })
|
||||
|
@ -466,6 +496,7 @@ require('lazy').setup({
|
|||
-- Allows extra capabilities provided by nvim-cmp
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
},
|
||||
|
||||
config = function()
|
||||
-- Brief aside: **What is LSP?**
|
||||
--
|
||||
|
@ -833,24 +864,6 @@ require('lazy').setup({
|
|||
end,
|
||||
},
|
||||
|
||||
{ -- You can easily change to a different colorscheme.
|
||||
-- Change the name of the colorscheme plugin below, and then
|
||||
-- change the command in the config to whatever the name of that colorscheme is.
|
||||
--
|
||||
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||
'folke/tokyonight.nvim',
|
||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||
init = function()
|
||||
-- Load the colorscheme here.
|
||||
-- Like many other themes, this one has different styles, and you could load
|
||||
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
||||
vim.cmd.colorscheme 'tokyonight-night'
|
||||
|
||||
-- You can configure highlights by doing something like:
|
||||
vim.cmd.hi 'Comment gui=none'
|
||||
end,
|
||||
},
|
||||
|
||||
-- Highlight todo, notes, etc in comments
|
||||
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
|
||||
|
||||
|
|
Loading…
Reference in New Issue