diff --git a/lua/plugins/icons.lua b/lua/plugins/icons.lua new file mode 100644 index 00000000..8a91f5ea --- /dev/null +++ b/lua/plugins/icons.lua @@ -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 = '💤 ', + } diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index c59362c2..47493aa9 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -543,23 +543,7 @@ 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, - }, + require 'plugins.kickstart.tokyo_night', -- Highlight todo, notes, etc in comments { '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 end, }, - { -- Highlight, edit, and navigate code - '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` + require 'plugins.kickstart.treesitter', - -- Prefer git instead of curl in order to improve connectivity in some environments - 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 kickstart plugins require 'plugins.kickstart.indent_line', require 'plugins.kickstart.lint', require 'plugins.kickstart.autopairs', @@ -673,20 +602,6 @@ require('lazy').setup({ ui = { -- 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 - icons = vim.g.have_nerd_font and {} or { - cmd = '⌘', - config = '🛠', - event = '📅', - ft = '📂', - init = '⚙', - keys = '🗝', - plugin = '🔌', - runtime = '💻', - require = '🌙', - source = '📄', - start = '🚀', - task = '📌', - lazy = '💤 ', - }, + icons = require 'plugins.icons', }, }) diff --git a/lua/plugins/kickstart/tokyo_night.lua b/lua/plugins/kickstart/tokyo_night.lua new file mode 100644 index 00000000..ce0cc741 --- /dev/null +++ b/lua/plugins/kickstart/tokyo_night.lua @@ -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, +} diff --git a/lua/plugins/kickstart/treesitter.lua b/lua/plugins/kickstart/treesitter.lua index 4b621010..8540cdff 100644 --- a/lua/plugins/kickstart/treesitter.lua +++ b/lua/plugins/kickstart/treesitter.lua @@ -2,7 +2,19 @@ return { -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate', 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 auto_install = true, highlight = {