diff --git a/init.lua b/init.lua index 854c51b1..78bb09df 100644 --- a/init.lua +++ b/init.lua @@ -933,28 +933,6 @@ require('lazy').setup({ }, }, - { -- 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', @@ -982,7 +960,17 @@ require('lazy').setup({ -- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren -- - sd' - [S]urround [D]elete [']quotes -- - sr)' - [S]urround [R]eplace [)] ['] - require('mini.surround').setup() + require('mini.surround').setup { + mappings = { + add = 'ra', -- Add surrounding in Normal and Visual modes + delete = 'rd', -- Delete surrounding + find = 'rf', -- Find surrounding (to the right) + find_left = 'rF', -- Find surrounding (to the left) + highlight = 'rh', -- Highlight surrounding + replace = 'rr', -- Replace surrounding + update_n_lines = 'rn', -- Update `n_lines` + }, + } -- Simple and easy statusline. -- You could remove this setup call if you don't like it, @@ -1009,7 +997,28 @@ require('lazy').setup({ branch = 'main', -- [[ Configure Treesitter ]] See `:help nvim-treesitter-intro` config = function() - local parsers = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' } + local parsers = { + 'jsx', + 'tsx', + 'javascript', + 'typescript', + 'rust', + 'zig', + 'bash', + 'c', + 'cpp', + 'python', + 'vimdoc', + 'vim', + 'lua', + 'php', + 'html', + 'svelte', + 'markdown', + 'markdown_inline', + 'yaml', + 'json', + } require('nvim-treesitter').install(parsers) vim.api.nvim_create_autocmd('FileType', { callback = function(args) diff --git a/test.jsx b/test.jsx new file mode 100644 index 00000000..418f65fd --- /dev/null +++ b/test.jsx @@ -0,0 +1,9 @@ +const Component = (props) => { + return ( + <> +

Hello Mantap

+ + ); +}; + +export default Component; diff --git a/test.py b/test.py new file mode 100644 index 00000000..8cde7829 --- /dev/null +++ b/test.py @@ -0,0 +1 @@ +print("hello world") diff --git a/test.tsx b/test.tsx new file mode 100644 index 00000000..f2bdcdde --- /dev/null +++ b/test.tsx @@ -0,0 +1,9 @@ +const Component = (props) => { + return ( + <> +

Hello World

+ + ); +}; + +export default Component;