Mercurial > dotfiles
comparison dot_config/nvim/config.lua @ 361:337eb27fc66e
Add galaxyline for statusline
author | zegervdv <zegervdv@me.com> |
---|---|
date | Fri, 12 Mar 2021 18:21:25 +0100 |
parents | faf583aae0f4 |
children | c2c870fb8095 |
comparison
equal
deleted
inserted
replaced
360:8eea2953979c | 361:337eb27fc66e |
---|---|
75 use { | 75 use { |
76 'lukas-reineke/indent-blankline.nvim', | 76 'lukas-reineke/indent-blankline.nvim', |
77 branch = 'lua', | 77 branch = 'lua', |
78 config = function () | 78 config = function () |
79 vim.g.indent_blankline_buftype_exclude = {'terminal', 'help', 'nofile'} | 79 vim.g.indent_blankline_buftype_exclude = {'terminal', 'help', 'nofile'} |
80 vim.g.indent_blankline_char_highlight = 'Conceal' | |
81 end | 80 end |
82 } | 81 } |
83 | 82 |
84 -- Tmux | 83 -- Tmux |
85 function test_tmux() | 84 function test_tmux() |
142 'nvim-lua/popup.nvim', | 141 'nvim-lua/popup.nvim', |
143 'nvim-lua/plenary.nvim' | 142 'nvim-lua/plenary.nvim' |
144 } | 143 } |
145 } | 144 } |
146 | 145 |
146 use { | |
147 'glepnir/galaxyline.nvim', | |
148 branch = 'main', | |
149 -- your statusline | |
150 config = function() | |
151 local gl = require'galaxyline' | |
152 local colors = require('galaxyline.theme').default | |
153 local condition = require('galaxyline.condition') | |
154 local gls = gl.section | |
155 | |
156 colors.bg = '#2C323C' | |
157 | |
158 gls.left[1] = { | |
159 RainbowRed = { | |
160 provider = function() return '▊ ' end, | |
161 highlight = {colors.blue,colors.bg} | |
162 }, | |
163 } | |
164 | |
165 gls.left[2] = { | |
166 FileName = { | |
167 provider = 'FileName', | |
168 condition = condition.buffer_not_empty, | |
169 highlight = {colors.magenta,colors.bg,'bold'} | |
170 } | |
171 } | |
172 | |
173 | |
174 gls.left[5] = { | |
175 DiagnosticError = { | |
176 provider = 'DiagnosticError', | |
177 icon = ' ', | |
178 highlight = {colors.red,colors.bg} | |
179 } | |
180 } | |
181 | |
182 gls.right[1] = { | |
183 ShowLspClient = { | |
184 provider = 'GetLspClient', | |
185 condition = function () | |
186 local tbl = {['dashboard'] = true,['']=true} | |
187 if tbl[vim.bo.filetype] then | |
188 return false | |
189 end | |
190 return true | |
191 end, | |
192 icon = ' LSP:', | |
193 highlight = {colors.green,colors.bg,'bold'} | |
194 } | |
195 } | |
196 | |
197 gls.right[2] = { | |
198 LineInfo = { | |
199 provider = 'LineColumn', | |
200 separator = ' ', | |
201 separator_highlight = {'NONE',colors.bg}, | |
202 highlight = {colors.fg,colors.bg}, | |
203 }, | |
204 } | |
205 | |
206 gls.right[3] = { | |
207 PerCent = { | |
208 provider = 'LinePercent', | |
209 separator = ' ', | |
210 separator_highlight = {'NONE',colors.bg}, | |
211 highlight = {colors.fg,colors.bg,'bold'}, | |
212 } | |
213 } | |
214 gls.right[8] = { | |
215 RainbowBlue = { | |
216 provider = function() return ' ▊' end, | |
217 highlight = {colors.blue,colors.bg} | |
218 }, | |
219 } | |
220 | |
221 gls.short_line_left[1] = { | |
222 BufferType = { | |
223 provider = 'FileTypeName', | |
224 separator = ' ', | |
225 separator_highlight = {'NONE',colors.bg}, | |
226 highlight = {colors.blue,colors.bg,'bold'} | |
227 } | |
228 } | |
229 | |
230 gls.short_line_left[2] = { | |
231 SFileName = { | |
232 provider = 'SFileName', | |
233 condition = condition.buffer_not_empty, | |
234 highlight = {colors.fg,colors.bg,'bold'} | |
235 } | |
236 } | |
237 | |
238 gls.short_line_right[1] = { | |
239 BufferIcon = { | |
240 provider= 'BufferIcon', | |
241 highlight = {colors.fg,colors.bg} | |
242 } | |
243 } | |
244 end, | |
245 } | |
246 | |
147 -- File navigation | 247 -- File navigation |
148 use {'justinmk/vim-dirvish'} | 248 use {'justinmk/vim-dirvish'} |
149 | 249 |
150 -- Colorscheme | 250 -- Colorscheme |
151 use {'zegervdv/nvcode-color-schemes.vim'} | 251 use {'zegervdv/nvcode-color-schemes.vim'} |
168 -- This came from https://github.com/tjdevries/config_manager/blob/master/xdg_config/nvim/lua/lsp_config.lua | 268 -- This came from https://github.com/tjdevries/config_manager/blob/master/xdg_config/nvim/lua/lsp_config.lua |
169 local mapper = function(mode, key, result, noremap) | 269 local mapper = function(mode, key, result, noremap) |
170 if noremap == nil then | 270 if noremap == nil then |
171 noremap = true | 271 noremap = true |
172 end | 272 end |
173 vim.fn.nvim_buf_set_keymap(0, mode, key, result, {noremap=noremap, silent=true}) | 273 vim.api.nvim_buf_set_keymap(0, mode, key, result, {noremap=noremap, silent=true}) |
174 end | 274 end |
175 | 275 |
176 -- LSP and Treesitter config | 276 -- LSP and Treesitter config |
177 | 277 |
178 local lsp = require'lspconfig' | 278 local lsp = require'lspconfig' |