Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed Nov 20, 2024
1 parent 8ba7cf8 commit 3c49d44
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 14 deletions.
10 changes: 8 additions & 2 deletions colors/solarized.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
-- orange #cb4b16
-- violet #6c71c4
local colors = {
base04 = '#00202b',
base03 = '#002936',
Expand All @@ -9,16 +11,19 @@ local colors = {
base2 = '#eee8d5',
base3 = '#fdf6e3',
yellow = '#b58900',
orange = '#b86614',
orange = '#b86114',
red = '#d75f5f',
violet = '#887ec8',
blue = '#268bd2',
cyan = '#2aa198',
green = '#84a800',
magenta = '#d33682',
-- Custom modifications
fg = '#b6b6b6', -- Brighter foreground
}

vim.g.colors_name = 'solarized'

local function shl(group, properties)
vim.api.nvim_set_hl(0, group, properties)
end
Expand All @@ -43,7 +48,7 @@ local function load_solarized()
shl('Special', { fg = colors.orange })
shl('Operator', { fg = colors.base0 })
shl('Underlined', { fg = colors.violet, underline = true })
shl('Todo', { fg = colors.violet, bold = true })
shl('Todo', { fg = colors.magenta, bold = true })
shl('Error', { fg = colors.red, bg = colors.base03, bold = true })
shl('WarningMsg', { fg = colors.orange })
shl('IncSearch', { fg = colors.base03, bg = colors.orange })
Expand All @@ -67,6 +72,7 @@ local function load_solarized()
shl('ColorColumn', { bg = colors.base02 })
shl('Title', { fg = colors.orange })
shl('WildMenu', { fg = colors.base2, bg = colors.base02, reverse = true })
shl('Folded', { bg = colors.base02, fg = colors.base0 })

-- Treesitter highlights
shl('@function', { fg = colors.blue })
Expand Down
35 changes: 34 additions & 1 deletion lua/core/init.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
require('core.pack'):boot_strap()
require('core.options')
vim.cmd.colorscheme('solarized')

-- read colorscheme from environment vairable COLORSCHEME
if vim.env.COLORSCHEME then
vim.cmd.colorscheme(vim.env.COLORSCHEME)
return
end

if not vim.g.colors_name then
vim.cmd([[
hi EndOfBuffer guifg=#14161b
hi Function guifg=#a6dbff
hi link @property @variable
hi Type guifg=#fce094
hi link @type.builtin Type
hi link @type Type
hi link Delimiter Comment
hi DiagnosticUnderlineError guisp=#ffc0b9 cterm=undercurl gui=undercurl
hi DiagnosticUnderlineWarn guisp=#fce094 cterm=undercurl gui=undercurl
hi DiagnosticUnderlineInfo guisp=#8cf8f7 cterm=undercurl gui=undercurl
hi DiagnosticUnderlineHint guisp=#a6dbff cterm=undercurl gui=undercurl
hi DiagnosticUnderlineOk guisp=#b3f6c0 cterm=underline gui=underline
hi IndentLine guifg=#2c2e33
hi IndentLineCurrent guifg=#9b9ea4
hi netrwTreeBar guifg=#2c2e33
hi DashboardHeader guifg=#b3f6c0
hi GitSignsAdd guifg=#005523
hi GitSignsChange guifg=#007373
hi GitSignsDelete guifg=#590008
]])
end
2 changes: 1 addition & 1 deletion lua/internal/completion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ au(InsertCharPre, {
local line_text = ffi.string(ffi.C.ml_get(lnum))
if char == '/' and is_path_related(line_text, col) then
feedkeys('<C-X><C-F>')
elseif not char:match('%s') and not buf_has_client(bufnr) then
elseif char:match('%w') and not buf_has_client(bufnr) then
debounce_feedkey('<C-X><C-N>')
end
end,
Expand Down
3 changes: 2 additions & 1 deletion lua/modules/tools/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ function config.guard()
cmd = 'stylua',
args = { '-' },
stdin = true,
ignore_patterns = 'functional/*/*_spec.lua',
ignore_patterns = 'function.*_spec%.lua',
find = '.stylua.toml',
})
ft('go'):fmt('lsp'):append('golines')
ft('rust'):fmt('rustfmt')
Expand Down
9 changes: 1 addition & 8 deletions lua/modules/tools/package.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
local conf = require('modules.tools.config')

packadd({
'nvimdev/flybuf.nvim',
cmd = 'FlyBuf',
config = function()
require('flybuf').setup({})
end,
})

packadd({
'nvimdev/template.nvim',
dev = true,
Expand All @@ -18,6 +10,7 @@ packadd({
packadd({
'nvimdev/guard.nvim',
ft = program_ft,
dev = true,
config = conf.guard,
dependencies = {
{ 'nvimdev/guard-collection' },
Expand Down
2 changes: 1 addition & 1 deletion lua/modules/ui/package.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ packadd({

packadd({
'nvimdev/modeline.nvim',
event = { 'BufReadPost */*' },
event = { 'BufReadPost */*', 'BufNewFile' },
config = function()
require('modeline').setup()
end,
Expand Down

0 comments on commit 3c49d44

Please sign in to comment.