Skip to content

Commit 24b8004

Browse files
committed
Revert "Refactor theme and status line into their own file"
This reverts commit 9572bf0.
1 parent 9572bf0 commit 24b8004

3 files changed

Lines changed: 11 additions & 27 deletions

File tree

lua/kickstart/plugins/autoformat.lua

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
return {
77
'neovim/nvim-lspconfig',
8-
98
config = function()
109
-- Switch for controlling whether you want autoformatting.
1110
-- Use :KickstartFormatToggle to toggle autoformatting on or off
@@ -29,9 +28,11 @@ return {
2928
return _augroups[client.id]
3029
end
3130

31+
-- Whenever an LSP attaches to a buffer, we will run this function.
32+
--
33+
-- See `:help LspAttach` for more information about this autocmd event.
3234
vim.api.nvim_create_autocmd('LspAttach', {
3335
group = vim.api.nvim_create_augroup('kickstart-lsp-attach-format', { clear = true }),
34-
3536
-- This is where we attach the autoformatting for reasonable clients
3637
callback = function(args)
3738
local client_id = args.data.client_id
@@ -49,6 +50,8 @@ return {
4950
return
5051
end
5152

53+
-- Create an autocmd that will run *before* we save the buffer.
54+
-- Run the formatting command for the LSP that has just attached.
5255
vim.api.nvim_create_autocmd('BufWritePre', {
5356
group = get_augroup(client),
5457
buffer = bufnr,
@@ -57,7 +60,12 @@ return {
5760
return
5861
end
5962

60-
vim.lsp.buf.format { async = false }
63+
vim.lsp.buf.format {
64+
async = false,
65+
filter = function(c)
66+
return c.id == client.id
67+
end,
68+
}
6169
end,
6270
})
6371
end,

lua/kickstart/plugins/statusline.lua

Lines changed: 0 additions & 14 deletions
This file was deleted.

lua/kickstart/plugins/theme.lua

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)