You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
2.1 KiB

local get_hex = require('cokeline/utils').get_hex
local gps = require("nvim-gps")
local coq = require "coq"
gps.setup()
require("indent_blankline").setup {
char = "|",
buftype_exclude = {"terminal"}
}
require'lspconfig'.clangd.setup{
coq.lsp_ensure_capabilities()
}
require'lspconfig'.denols.setup{
coq.lsp_ensure_capabilities()
}
require'lspconfig'.vls.setup{
cmd = {'/usr/local/bin/vls'},
coq.lsp_ensure_capabilities()
}
vim.cmd('COQnow -s')
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'onedark',
component_separators = {'', ''},
section_separators = {'', ''},
disabled_filetypes = {}
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch'},
lualine_c = {'filename', { gps.get_location, condition = gps.is_available }},
lualine_x = {'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {'filename'},
lualine_x = {'location'},
lualine_y = {},
lualine_z = {}
},
tabline = {},
extensions = {}
}
-- Credit to the original author of cokeline for creating most of this config
require('cokeline').setup({
default_hl = {
focused = {
fg = get_hex('Normal', 'fg'),
bg = get_hex('ColorColumn', 'bg'),
},
unfocused = {
fg = get_hex('Comment', 'fg'),
bg = get_hex('ColorColumn', 'bg'),
},
},
components = {
{
text = function(buffer)
if buffer.is_focused then
return '' .. buffer.devicon.icon
else
return '| ' .. buffer.devicon.icon
end
end,
hl = {
fg = function(buffer) return buffer.devicon.color end,
bg = get_hex('ColorColumn', 'bg')
},
},
{
text = function(buffer) return buffer.unique_prefix end,
hl = {
fg = get_hex('Comment', 'fg'),
bg = get_hex('ColorColumn', 'bg'),
style = 'italic',
},
},
{
text = function(buffer) return buffer.filename .. ' ' end,
},
{
text = 'X',
delete_buffer_on_left_click = true,
},
{
text = ' ',
}
},
})