personal touches
This commit is contained in:
parent
94a93643ab
commit
f258554d3c
15
init.lua
15
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.
|
||||
['<C-y>'] = cmp.mapping.confirm { select = true },
|
||||
['<enter>'] = 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.
|
||||
|
|
Loading…
Reference in New Issue