diff --git a/init.lua b/init.lua index 776c6873ff6..321f63f6a1e 100644 --- a/init.lua +++ b/init.lua @@ -102,7 +102,7 @@ vim.g.have_nerd_font = false vim.opt.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.opt.relativenumber = true +vim.opt.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' @@ -247,6 +247,14 @@ require('lazy').setup({ -- -- Use `opts = {}` to automatically pass options to a plugin's `setup()` function, forcing the plugin to be loaded. -- + -- This is equivalent to: + -- require('Comment').setup({}) + + -- "gc" to comment visual regions/lines + { 'numToStr/Comment.nvim', opts = {} }, + { 'vidocqh/data-viewer.nvim', opts = {}, dependencies = { + 'nvim-lua/plenary.nvim', + } }, -- Alternatively, use `config = function() ... end` for full control over the configuration. -- If you prefer to call `setup` explicitly, use: @@ -342,12 +350,13 @@ require('lazy').setup({ }, }, }, - -- NOTE: Plugins can specify dependencies. -- -- The dependencies are proper plugin specifications as well - anything -- you do for a plugin at the top level, you can do for a dependency. -- + -- + -- -- Use the `dependencies` key to specify the dependencies of a particular plugin { -- Fuzzy Finder (files, lsp, etc) @@ -665,7 +674,7 @@ require('lazy').setup({ local servers = { -- clangd = {}, -- gopls = {}, - -- pyright = {}, + pyright = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- @@ -708,6 +717,7 @@ require('lazy').setup({ local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { 'stylua', -- Used to format Lua code + 'pyright', }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } @@ -761,7 +771,7 @@ require('lazy').setup({ formatters_by_ft = { lua = { 'stylua' }, -- Conform can also run multiple formatters sequentially - -- python = { "isort", "black" }, + python = { 'isort', 'black' }, -- -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true }, @@ -867,29 +877,6 @@ require('lazy').setup({ signature = { enabled = true }, }, }, - - { -- 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. - config = function() - ---@diagnostic disable-next-line: missing-fields - require('tokyonight').setup { - styles = { - comments = { italic = false }, -- Disable italics in comments - }, - } - - -- 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' - end, - }, - -- Highlight todo, notes, etc in comments { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, @@ -933,7 +920,7 @@ require('lazy').setup({ { -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate', - main = 'nvim-treesitter.configs', -- Sets main module to use for opts + main = 'nvim-treesitter.config', -- Sets main module to use for opts -- [[ Configure Treesitter ]] See `:help nvim-treesitter` opts = { ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, @@ -976,7 +963,8 @@ require('lazy').setup({ -- This is the easiest way to modularize your config. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- { import = 'custom.plugins' }, + -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` + { import = 'custom.plugins' }, -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- Or use telescope! @@ -1004,5 +992,6 @@ require('lazy').setup({ }, }) +require 'colors.colorscheme' -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et diff --git a/lua/colors/colorscheme.lua b/lua/colors/colorscheme.lua new file mode 100644 index 00000000000..2a67d684567 --- /dev/null +++ b/lua/colors/colorscheme.lua @@ -0,0 +1,4 @@ +local colorscheme = 'gruvbox' +vim.o.background = 'dark' +vim.cmd.colorscheme(colorscheme) +vim.cmd.hi 'Comment gui=none' diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua deleted file mode 100644 index be0eb9d8d7a..00000000000 --- a/lua/custom/plugins/init.lua +++ /dev/null @@ -1,5 +0,0 @@ --- You can add your own plugins here or in other files in this directory! --- I promise not to create any merge conflicts in this directory :) --- --- See the kickstart.nvim README for more information -return {} diff --git a/lua/custom/plugins/plugins.lua b/lua/custom/plugins/plugins.lua new file mode 100644 index 00000000000..09108d5ddbc --- /dev/null +++ b/lua/custom/plugins/plugins.lua @@ -0,0 +1,27 @@ +-- You can add your own plugins here or in other files in this directory! +-- I promise not to create any merge conflicts in this directory :) +-- +-- See the kickstart.nvim README for more information +return { + 'morhetz/gruvbox', + 'tanvirtin/monokai.nvim', + 'folke/tokyonight.nvim', + 'EdenEast/nightfox.nvim', + { + 'nvim-tree/nvim-tree.lua', + config = function() + local api = require 'nvim-tree.api' + vim.g.loaded_netrw = 1 + vim.g.loaded_netrwPlugin = 1 + vim.keymap.set('n', 'st', function() + api.tree.toggle() + end, { desc = '[S]earch file tree [T]oggle' }) + require('nvim-tree').setup { + sort = { sorter = 'case_sensitive' }, + view = { width = 30 }, + renderer = { group_empty = true }, + filters = { dotfiles = true }, + } + end, + }, +}