more refactoring
I got the color scheme and tree sitter into their own files.
This commit is contained in:
parent
84ca5bf93e
commit
2330a0d8ab
|
@ -0,0 +1,16 @@
|
||||||
|
return vim.g.have_nerd_font and {}
|
||||||
|
or {
|
||||||
|
cmd = '⌘',
|
||||||
|
config = '🛠',
|
||||||
|
event = '📅',
|
||||||
|
ft = '📂',
|
||||||
|
init = '⚙',
|
||||||
|
keys = '🗝',
|
||||||
|
plugin = '🔌',
|
||||||
|
runtime = '💻',
|
||||||
|
require = '🌙',
|
||||||
|
source = '📄',
|
||||||
|
start = '🚀',
|
||||||
|
task = '📌',
|
||||||
|
lazy = '💤 ',
|
||||||
|
}
|
|
@ -543,23 +543,7 @@ require('lazy').setup({
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ -- You can easily change to a different colorscheme.
|
require 'plugins.kickstart.tokyo_night',
|
||||||
-- 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
|
-- Highlight todo, notes, etc in comments
|
||||||
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
|
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
|
||||||
|
@ -601,64 +585,9 @@ require('lazy').setup({
|
||||||
-- Check out: https://github.com/echasnovski/mini.nvim
|
-- Check out: https://github.com/echasnovski/mini.nvim
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ -- Highlight, edit, and navigate code
|
require 'plugins.kickstart.treesitter',
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
build = ':TSUpdate',
|
|
||||||
opts = {
|
|
||||||
ensure_installed = {
|
|
||||||
'bash',
|
|
||||||
'c',
|
|
||||||
'javascript',
|
|
||||||
'typescript',
|
|
||||||
'python',
|
|
||||||
'diff',
|
|
||||||
'html',
|
|
||||||
'lua',
|
|
||||||
'luadoc',
|
|
||||||
'markdown',
|
|
||||||
'markdown_inline',
|
|
||||||
'query',
|
|
||||||
'vim',
|
|
||||||
'vimdoc',
|
|
||||||
},
|
|
||||||
-- Autoinstall languages that are not installed
|
|
||||||
auto_install = true,
|
|
||||||
highlight = {
|
|
||||||
enable = true,
|
|
||||||
-- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
|
|
||||||
-- If you are experiencing weird indenting issues, add the language to
|
|
||||||
-- the list of additional_vim_regex_highlighting and disabled languages for indent.
|
|
||||||
additional_vim_regex_highlighting = { 'ruby' },
|
|
||||||
},
|
|
||||||
indent = { enable = true, disable = { 'ruby' } },
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
|
||||||
|
|
||||||
-- Prefer git instead of curl in order to improve connectivity in some environments
|
-- require kickstart plugins
|
||||||
require('nvim-treesitter.install').prefer_git = true
|
|
||||||
---@diagnostic disable-next-line: missing-fields
|
|
||||||
require('nvim-treesitter.configs').setup(opts)
|
|
||||||
|
|
||||||
-- There are additional nvim-treesitter modules that you can use to interact
|
|
||||||
-- with nvim-treesitter. You should go explore a few and see what interests you:
|
|
||||||
--
|
|
||||||
-- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
|
|
||||||
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
|
|
||||||
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the
|
|
||||||
-- init.lua. If you want these files, they are in the repository, so you can just download them and
|
|
||||||
-- place them in the correct locations.
|
|
||||||
|
|
||||||
-- NOTE: Next step on your Neovim journey: Add/Configure additional plugins for Kickstart
|
|
||||||
--
|
|
||||||
-- Here are some example plugins that I've included in the Kickstart repository.
|
|
||||||
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
|
||||||
--
|
|
||||||
-- require 'kickstart.plugins.debug',
|
|
||||||
require 'plugins.kickstart.indent_line',
|
require 'plugins.kickstart.indent_line',
|
||||||
require 'plugins.kickstart.lint',
|
require 'plugins.kickstart.lint',
|
||||||
require 'plugins.kickstart.autopairs',
|
require 'plugins.kickstart.autopairs',
|
||||||
|
@ -673,20 +602,6 @@ require('lazy').setup({
|
||||||
ui = {
|
ui = {
|
||||||
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
||||||
-- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table
|
-- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table
|
||||||
icons = vim.g.have_nerd_font and {} or {
|
icons = require 'plugins.icons',
|
||||||
cmd = '⌘',
|
|
||||||
config = '🛠',
|
|
||||||
event = '📅',
|
|
||||||
ft = '📂',
|
|
||||||
init = '⚙',
|
|
||||||
keys = '🗝',
|
|
||||||
plugin = '🔌',
|
|
||||||
runtime = '💻',
|
|
||||||
require = '🌙',
|
|
||||||
source = '📄',
|
|
||||||
start = '🚀',
|
|
||||||
task = '📌',
|
|
||||||
lazy = '💤 ',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
return { -- 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,
|
||||||
|
}
|
|
@ -2,7 +2,19 @@ return { -- Highlight, edit, and navigate code
|
||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
build = ':TSUpdate',
|
build = ':TSUpdate',
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = { 'bash', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc', 'python', 'javascript', 'typescript' },
|
ensure_installed = {
|
||||||
|
'bash',
|
||||||
|
'diff',
|
||||||
|
'html',
|
||||||
|
'lua',
|
||||||
|
'luadoc',
|
||||||
|
'markdown',
|
||||||
|
'vim',
|
||||||
|
'vimdoc',
|
||||||
|
'python',
|
||||||
|
'javascript',
|
||||||
|
'typescript',
|
||||||
|
},
|
||||||
-- Autoinstall languages that are not installed
|
-- Autoinstall languages that are not installed
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
highlight = {
|
highlight = {
|
||||||
|
|
Loading…
Reference in New Issue