diff --git a/init.lua b/init.lua index 8a727b71..7add8d39 100644 --- a/init.lua +++ b/init.lua @@ -81,21 +81,10 @@ If you experience any errors while trying to install kickstart, run `:checkhealt I hope you enjoy your Neovim journey, - TJ + P.S. You can delete this when you're done too. It's your config now! :) --]] --- Set how many spaces a tab counts for --- See `:help 'tabstop'` -vim.opt.tabstop = 2 - --- Set the number of spaces inserted for each indentation --- See `:help 'shiftwidth'` -vim.opt.shiftwidth = 2 - --- Use spaces instead of tabs --- See `:help 'expandtab'` --- vim.opt.expandtab = true - -- Set as the leader key -- See `:help mapleader` -- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) @@ -110,6 +99,18 @@ vim.g.have_nerd_font = true -- NOTE: You can change these options as you wish! -- For more options, you can see `:help option-list` +-- Set how many spaces a tab counts for +-- See `:help 'tabstop'` +vim.opt.tabstop = 2 + +-- Set the number of spaces inserted for each indentation +-- See `:help 'shiftwidth'` +vim.opt.shiftwidth = 2 + +-- Use spaces instead of tabs +-- See `:help 'expandtab'` +-- vim.opt.expandtab = true + -- Make line numbers default vim.opt.number = true -- You can also add relative line numbers, to help with jumping. @@ -254,7 +255,7 @@ vim.opt.rtp:prepend(lazypath) -- NOTE: Here is where you install your plugins. 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 + -- 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically -- NOTE: Plugins can also be added by using a table, -- with the first argument being the link and the following @@ -681,9 +682,6 @@ require('lazy').setup({ end, }, } - - -- Enable the `typescript-tools` plugin for TypeScript and JavaScript - -- require('typescript-tools').setup {} end, }, @@ -701,6 +699,7 @@ require('lazy').setup({ }, }, opts = { + notify = true, notify_on_error = false, format_on_save = function(bufnr) -- Disable "format_on_save lsp_fallback" for languages that don't @@ -721,6 +720,7 @@ require('lazy').setup({ -- is found. javascript = { { 'prettierd', 'prettier' } }, typescript = { { 'prettierd', 'prettier' } }, + css = { 'stylelint' }, }, }, }, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index a19c92c0..630f65ed 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -10,15 +10,4 @@ return { vim.cmd 'Copilot setup' end, }, - { - 'sbdchd/neoformat', - cmd = 'Neoformat', - config = function() - vim.g.neoformat_enabled_javascript = { 'prettier' } - vim.g.neoformat_enabled_python = { 'black' } - vim.g.neoformat_enabled_typescript = { 'prettier' } - vim.g.neoformat_enabled_yaml = { 'prettier' } - vim.g.neoformat_run_on_save = 1 - end, - }, }