Skip to content

Commit 5e4d24c

Browse files
committed
Revert "Refactor theme and status line into their own file"
This reverts commit cdaa750.
1 parent cdaa750 commit 5e4d24c

File tree

4 files changed

+34
-33
lines changed

4 files changed

+34
-33
lines changed

init.lua

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,35 @@ require('lazy').setup({
122122
changedelete = { text = '~' },
123123
},
124124
on_attach = function(bufnr)
125-
vim.keymap.set('n', '[c', require('gitsigns').prev_hunk, { buffer = bufnr, desc = 'Go to Previous Hunk' })
126-
vim.keymap.set('n', ']c', require('gitsigns').next_hunk, { buffer = bufnr, desc = 'Go to Next Hunk' })
125+
vim.keymap.set('n', '<leader>gp', require('gitsigns').prev_hunk, { buffer = bufnr, desc = '[G]o to [P]revious Hunk' })
126+
vim.keymap.set('n', '<leader>gn', require('gitsigns').next_hunk, { buffer = bufnr, desc = '[G]o to [N]ext Hunk' })
127127
vim.keymap.set('n', '<leader>ph', require('gitsigns').preview_hunk, { buffer = bufnr, desc = '[P]review [H]unk' })
128128
end,
129129
},
130130
},
131131

132-
-- Theme related configs go here
133-
require 'kickstart.plugins.theme',
132+
{
133+
-- Theme inspired by Atom
134+
'navarasu/onedark.nvim',
135+
priority = 1000,
136+
config = function()
137+
vim.cmd.colorscheme 'onedark'
138+
end,
139+
},
134140

135-
-- Status line related configs go here
136-
require 'kickstart.plugins.statusline',
141+
{
142+
-- Set lualine as statusline
143+
'nvim-lualine/lualine.nvim',
144+
-- See `:help lualine.txt`
145+
opts = {
146+
options = {
147+
icons_enabled = false,
148+
theme = 'onedark',
149+
component_separators = '|',
150+
section_separators = '',
151+
},
152+
},
153+
},
137154

138155
{
139156
-- Add indentation guides even on blank lines

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)