diff --git a/init.lua b/init.lua index 496f45b8..7fe0ff0d 100644 --- a/init.lua +++ b/init.lua @@ -227,6 +227,8 @@ vim.opt.rtp:prepend(lazypath) require('lazy').setup({ -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically + + 'JoosepAlviste/nvim-ts-context-commentstring', -- typescript commenting -- NOTE: Plugins can also be added by using a table, -- with the first argument being the link and the following @@ -238,7 +240,17 @@ require('lazy').setup({ -- require('Comment').setup({}) -- "gc" to comment visual regions/lines - { 'numToStr/Comment.nvim', opts = {} }, + -- { 'numToStr/Comment.nvim', opts = {} }, + { + 'numToStr/Comment.nvim', + config = function() + require('Comment').setup { + pre_hook = function() + return vim.bo.commentstring + end, + } + end, + }, -- Here is a more advanced example where we pass configuration -- options to `gitsigns.nvim`. This is equivalent to the following Lua: @@ -751,12 +763,21 @@ require('lazy').setup({ -- 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' + -- vim.cmd.colorscheme 'tokyonight-night' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none' end, }, + { + 'olimorris/onedarkpro.nvim', + priority = 1000, -- Ensure it loads first + init = function() + -- somewhere in your config: + -- vim.cmd("colorscheme onedark") + vim.cmd.colorscheme 'onedark' + end, + }, -- Highlight todo, notes, etc in comments { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },