From f258554d3c1e80c7e7dc86753d0541f7dc4e5d3a Mon Sep 17 00:00:00 2001 From: Matthew Rawlings Date: Sun, 14 Apr 2024 16:19:47 +0200 Subject: [PATCH] personal touches --- init.lua | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 3f537328..ada4df4e 100644 --- a/init.lua +++ b/init.lua @@ -90,6 +90,8 @@ P.S. You can delete this when you're done too. It's your config now! :) vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' +vim.opt.background = 'dark' -- or "light" + -- [[ Setting options ]] -- See `:help vim.opt` -- NOTE: You can change these options as you wish! @@ -585,6 +587,8 @@ require('lazy').setup { local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { 'stylua', -- Used to format lua code + 'prettier', + 'prettierd', }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } @@ -608,11 +612,14 @@ require('lazy').setup { opts = { notify_on_error = false, format_on_save = { - timeout_ms = 500, + timeout_ms = 1000, lsp_fallback = true, }, formatters_by_ft = { lua = { 'stylua' }, + javascript = { 'prettierd', 'prettier' }, + typescript = { 'prettierd', 'prettier' }, + typescriptreact = { 'prettierd', 'prettier' }, -- Conform can also run multiple formatters sequentially -- python = { "isort", "black" }, -- @@ -681,7 +688,7 @@ require('lazy').setup { -- Accept ([y]es) the completion. -- This will auto-import if your LSP supports it. -- This will expand snippets if the LSP sent a snippet. - [''] = cmp.mapping.confirm { select = true }, + [''] = cmp.mapping.confirm { select = true }, -- Manually trigger a completion from nvim-cmp. -- Generally you don't need this, because nvim-cmp will display @@ -732,7 +739,6 @@ require('lazy').setup { vim.cmd.hi 'Comment gui=none' end, }, - -- Highlight todo, notes, etc in comments { 'folke/todo-comments.nvim', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, @@ -753,6 +759,7 @@ require('lazy').setup { -- - sd' - [S]urround [D]elete [']quotes -- - sr)' - [S]urround [R]eplace [)] ['] require('mini.surround').setup() + require('mini.pairs').setup() -- Simple and easy statusline. -- You could remove this setup call if you don't like it, @@ -807,7 +814,7 @@ require('lazy').setup { -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- -- require 'kickstart.plugins.debug', - -- require 'kickstart.plugins.indent_line', + require 'kickstart.plugins.indent_line', -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config.