From 2ee5a6f127b64ad9ccc2c4b78093e6a95dbf5f90 Mon Sep 17 00:00:00 2001 From: Garrett Dawson Date: Tue, 21 Mar 2023 08:39:13 -0600 Subject: [PATCH] fix: add more vim.opt settings --- after/plugin/defaults.lua | 17 +++++++++++++++++ lua/kickstart/plugins/autoformat.lua | 6 +++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/after/plugin/defaults.lua b/after/plugin/defaults.lua index c1eecf11..1dfc08d2 100644 --- a/after/plugin/defaults.lua +++ b/after/plugin/defaults.lua @@ -1,3 +1,20 @@ +local set = vim.opt + +set.colorcolumn = "80,120" +set.cursorline = true +set.expandtab = true +set.list = true +set.swapfile = false +set.writebackup = false +set.wrap = false +-- vim.o.sessionoptions = "resize,winpos,winsize,buffers,tabpages,folds,curdir,help" +set.shiftwidth = 2 +-- vim.o.showmode = true +set.splitbelow = true +set.splitright = true +set.tabstop = 2 +set.textwidth = 80 + -- prev/next tab vim.keymap.set('n', 'H', 'gT') vim.keymap.set('n', 'L', 'gt') diff --git a/lua/kickstart/plugins/autoformat.lua b/lua/kickstart/plugins/autoformat.lua index 1bbd622e..bc56b15b 100644 --- a/lua/kickstart/plugins/autoformat.lua +++ b/lua/kickstart/plugins/autoformat.lua @@ -46,9 +46,9 @@ return { -- Tsserver usually works poorly. Sorry you work with bad languages -- You can remove this line if you know what you're doing :) - -- if client.name == 'tsserver' then - -- return - -- end + if client.name == 'tsserver' then + return + end -- Create an autocmd that will run *before* we save the buffer. -- Run the formatting command for the LSP that has just attached.