From e23c98ae698fc389f2acdf4a93254a4406a94729 Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Sun, 11 Jun 2023 21:31:37 +0200 Subject: [PATCH] Updated theme --- .gitignore | 1 - config/nvim/init.lua | 44 ++++++++++++++++++- config/nvim/lua/.luarc.json | 3 ++ config/nvim/lua/user/.luarc.json | 3 ++ nightly_cm.nvim/lua/.luarc.json | 3 ++ .../lua/lualine/themes/nightly_cm.lua | 44 ++++++++++++------- nightly_cm.nvim/lua/nightly_cm/theme.lua | 16 +++---- 7 files changed, 88 insertions(+), 26 deletions(-) create mode 100644 config/nvim/lua/.luarc.json create mode 100644 config/nvim/lua/user/.luarc.json create mode 100644 nightly_cm.nvim/lua/.luarc.json diff --git a/.gitignore b/.gitignore index 0b73dd8..e69de29 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +0,0 @@ -config/nvim/lua/user/.luarc.json diff --git a/config/nvim/init.lua b/config/nvim/init.lua index e606208..6fc109a 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -49,7 +49,7 @@ vim.o.scrolloff = 8 vim.o.showmode = false -vim.o.showtabline = 2 +vim.o.showtabline = 0 vim.o.wrap = false @@ -192,6 +192,37 @@ require('lazy').setup({ section_separators = '', globalstatus = true, }, + sections = { + lualine_a = { 'mode' }, + lualine_b = { 'branch' }, + lualine_c = { 'diff', 'diagnostics', 'filename' }, + lualine_x = { + { + -- Lsp server name . + function() + local msg = '' + -- local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype') + local clients = vim.lsp.get_active_clients({ bufnr = 0 }) + if next(clients) == nil then + return 'No Active Lsp' + end + for _, client in ipairs(clients) do + -- local filetypes = client.config.filetypes + -- if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then + msg = msg .. client.name .. " - " + -- end + end + if msg == '' then + return 'No Active Lsp' + end + return msg:sub(1, -4) + end, + color = { fg = '#afd787' }, + }, 'filetype', + }, + lualine_y = { 'progress' }, + lualine_z = { 'location' } + }, }, }, @@ -289,6 +320,17 @@ require('lazy').setup({ end, }, + { + "nvim-tree/nvim-tree.lua", + version = "*", + dependencies = { + "nvim-tree/nvim-web-devicons", + }, + config = function() + require("nvim-tree").setup {} + end, + }, + }, {}) ------------------------------------------------------------------- diff --git a/config/nvim/lua/.luarc.json b/config/nvim/lua/.luarc.json new file mode 100644 index 0000000..23b9ee2 --- /dev/null +++ b/config/nvim/lua/.luarc.json @@ -0,0 +1,3 @@ +{ + "workspace.checkThirdParty": false +} \ No newline at end of file diff --git a/config/nvim/lua/user/.luarc.json b/config/nvim/lua/user/.luarc.json new file mode 100644 index 0000000..23b9ee2 --- /dev/null +++ b/config/nvim/lua/user/.luarc.json @@ -0,0 +1,3 @@ +{ + "workspace.checkThirdParty": false +} \ No newline at end of file diff --git a/nightly_cm.nvim/lua/.luarc.json b/nightly_cm.nvim/lua/.luarc.json new file mode 100644 index 0000000..23b9ee2 --- /dev/null +++ b/nightly_cm.nvim/lua/.luarc.json @@ -0,0 +1,3 @@ +{ + "workspace.checkThirdParty": false +} \ No newline at end of file diff --git a/nightly_cm.nvim/lua/lualine/themes/nightly_cm.lua b/nightly_cm.nvim/lua/lualine/themes/nightly_cm.lua index bc8089c..fc0e478 100644 --- a/nightly_cm.nvim/lua/lualine/themes/nightly_cm.lua +++ b/nightly_cm.nvim/lua/lualine/themes/nightly_cm.lua @@ -1,39 +1,51 @@ local nightly = { normal = { - a = { bg = "#000000", fg = "#87afd7" }, - b = { bg = "#000000", fg = "#c6c6c6" }, - c = { bg = "#000000", fg = "#c6c6c6" }, + -- a = { bg = "#000000", fg = "#87afd7" }, + a = { bg = "#87afd7", fg = "#0c0c0c" }, + -- b = { bg = "#000000", fg = "#c6c6c6" }, + b = { bg = "#262626", fg = "#87afd7" }, + c = { bg = "#0c0c0c", fg = "#c6c6c6" }, }, insert = { - a = { bg = "#000000", fg = "#afd787" }, - b = { bg = "#000000", fg = "#c6c6c6" }, + -- a = { bg = "#000000", fg = "#afd787" }, + a = { bg = "#afd787", fg = "#0c0c0c" }, + -- b = { bg = "#000000", fg = "#c6c6c6" }, + b = { bg = "#262626", fg = "#afd787" }, }, command = { - a = { bg = "#000000", fg = "#d7af5f" }, - b = { bg = "#000000", fg = "#c6c6c6" }, + -- a = { bg = "#000000", fg = "#d7af5f" }, + a = { bg = "#d7af5f", fg = "#0c0c0c" }, + -- b = { bg = "#000000", fg = "#c6c6c6" }, + b = { bg = "#262626", fg = "#d7af5f" }, }, visual = { - a = { bg = "#000000", fg = "#87afd7" }, - b = { bg = "#000000", fg = "#c6c6c6" }, + -- a = { bg = "#000000", fg = "#87afd7" }, + a = { bg = "#87afd7", fg = "#0c0c0c" }, + -- b = { bg = "#000000", fg = "#c6c6c6" }, + b = { bg = "#262626", fg = "#87afd7" }, }, replace = { - a = { bg = "#000000", fg = "#d75f00" }, - b = { bg = "#000000", fg = "#c6c6c6" }, + -- a = { bg = "#000000", fg = "#d75f00" }, + a = { bg = "#d75f00", fg = "#0c0c0c" }, + -- b = { bg = "#000000", fg = "#c6c6c6" }, + b = { bg = "#262626", fg = "#d75f00" }, }, terminal = { - a = { bg = "#000000", fg = "#87afd7" }, - b = { bg = "#000000", fg = "#c6c6c6" }, + -- a = { bg = "#000000", fg = "#87afd7" }, + a = { bg = "#87afd7", fg = "#0c0c0c" }, + -- b = { bg = "#000000", fg = "#c6c6c6" }, + b = { bg = "#262626", fg = "#87afd7" }, }, inactive = { - a = { bg = "#000000", fg = "#c6c6c6" }, - b = { bg = "#000000", fg = "#c6c6c6" }, - c = { bg = "#000000", fg = "#c6c6c6" }, + a = { bg = "#0c0c0c", fg = "#c6c6c6" }, + b = { bg = "#0c0c0c", fg = "#c6c6c6" }, + c = { bg = "#0c0c0c", fg = "#c6c6c6" }, }, } return nightly diff --git a/nightly_cm.nvim/lua/nightly_cm/theme.lua b/nightly_cm.nvim/lua/nightly_cm/theme.lua index dd17066..de51db7 100644 --- a/nightly_cm.nvim/lua/nightly_cm/theme.lua +++ b/nightly_cm.nvim/lua/nightly_cm/theme.lua @@ -217,8 +217,8 @@ function theme.setup() -- nvim-tree.lua: https://github.com/nvim-tree/nvim-tree.lua NvimTreeEmptyFolderName = { fg = p.foreground }, - NvimTreeEndOfBuffer = { fg = p.foreground, bg = p.background }, - NvimTreeEndOfBufferNC = { fg = p.foreground, bg = p.background }, + NvimTreeEndOfBuffer = { fg = p.black, bg = p.black }, + NvimTreeEndOfBufferNC = { fg = p.black, bg = p.black }, NvimTreeFolderIcon = { fg = p.color4, bg = p.background }, NvimTreeFolderName = { fg = p.foreground }, NvimTreeGitDeleted = { fg = p.color1 }, @@ -226,8 +226,8 @@ function theme.setup() NvimTreeGitNew = { fg = p.color4 }, NvimTreeImageFile = { fg = p.foreground }, NvimTreeIndentMarker = { fg = p.color0 }, - NvimTreeNormal = { fg = p.foreground, bg = p.background }, - NvimTreeNormalNC = { fg = p.foreground, bg = p.background }, + NvimTreeNormal = { fg = p.foreground, bg = p.black }, + NvimTreeNormalNC = { fg = p.foreground, bg = p.black }, NvimTreeOpenedFolderName = { fg = p.foreground }, NvimTreeRootFolder = { fg = p.color12 }, NvimTreeSpecialFile = { fg = p.color5 }, @@ -328,7 +328,7 @@ function theme.setup() TelescopeMatching = { fg = p.color2 }, TelescopeSelection = { fg = p.color2, bg = p.bg }, TelescopeMultiSelection = { bg = p.color16 }, - TelescopePromptTitle = { fg = p.background, bg = p.color15 }, + TelescopePromptTitle = { fg = p.background, bg = p.color2 }, TelescopePreviewLine = { bg = p.background }, TelescopePromptPrefix = { fg = p.color2, bg = p.cursorline }, TelescopePromptBorder = { fg = p.cursorline, bg = p.cursorline }, @@ -336,9 +336,9 @@ function theme.setup() TelescopeResultsTitle = { fg = p.color16, bg = p.color16 }, TelescopeResultsBorder = { fg = p.color16, bg = p.color16 }, TelescopeResultsNormal = { fg = p.foreground, bg = p.color16 }, - TelescopePreviewTitle = { fg = p.background, bg = p.color3 }, - TelescopePreviewBorder = { fg = p.color16, bg = p.color16 }, - TelescopePreviewNormal = { fg = p.foreground, bg = p.color16 }, + TelescopePreviewTitle = { fg = p.cursorline, bg = p.color3 }, + TelescopePreviewBorder = { fg = p.cursorline, bg = p.cursorline }, + TelescopePreviewNormal = { fg = p.foreground, bg = p.cursorline }, -- trouble.nvim: https://github.com/folke/trouble.nvim LspTroubleCount = { fg = p.color6, bg = p.foreground },