GithubHelp home page GithubHelp logo

mrjones2014 / lighthaus.nvim Goto Github PK

View Code? Open in Web Editor NEW
63.0 4.0 5.0 1.81 MB

A Lua implementation of lighthaus-theme/vim-lighthaus

License: MIT License

Lua 99.55% Vim Script 0.45%
neovim neovim-plugin neovim-theme lua lighthaus-theme lighthaus hacktoberfest nvim lsp nvim-cmp

lighthaus.nvim's Introduction

lighthaus.nvim

A Lua implementation of lighthaus-theme/vim-lighthaus, with added built-in LSP support!

Default (:colorscheme lighthaus):

normal

Dark (:colorscheme lighthaus_dark):

dark

Config

Lighthaus.nvim requires termguicolors.

init.lua:

vim.opt.termguicolors = true

.vimrc/init.vim:

set termguicolors

You can override colors using the Lua API. Calling setup() will load the colorscheme, so you can omit :colorscheme lighthaus from your config when using the Lua API.

require('lighthaus').setup({
  -- set true to use dark bg by default
  bg_dark = false,
  -- see colors.lua to see colors table, set overrides here to be merged with defaults
  colors = {},
  -- set to 'underline' to replace undercurl with underline
  -- or empty string '' to disable
  lsp_underline_style = 'undercurl',
  -- make background transparent, this overrides `bg_dark`
  transparent = false,
  -- use an italic font for comments
  italic_comments = false,
  -- use an italic font for keywords/conditionals
  italic_keywords = false,
})

Making Undercurls Work in Tmux

To have undercurls appear properly and in color, add the following to your tmux config file:

set -g default-terminal "${TERM}"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'  # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'  # underscore colours - needs tmux-3.0

Plugin Support

Plus Neovim's built-in LSP. Feel free to create a PR to support other plugins not listed here.

* Bufferline.nvim requires some configuration to integrate nicely with the theme. Recommended bufferline.nvim config:

local colors = require('lighthaus.colors')
require('bufferline').setup({
  options = {
    separator_style = 'slant',
    themable = true,
  },
  highlights = {
    fill = {
      guifg = colors.blacker_than_black,
      guibg = colors.blacker_than_black,
    },
    separator = {
      guifg = colors.blacker_than_black,
      guibg = colors.bg_dark,
    },
    separator_visible = {
      guifg = colors.blacker_than_black,
      guibg = colors.bg_dark,
    },
    separator_selected = {
      guifg = colors.blacker_than_black,
      guibg = colors.bg_dark,
    },
  },
})

** lighthaus.nvim adds a highlight group RustInlayHint that can be used for the Rust inlay hints added by lsp_extensions. You need to specify the highlight group to use in lsp_extensions config. Example:

require('lsp_extensions').inlay_hints({
  highlight = 'RustInlayHint',
  enabled = { 'TypeHint', 'ChainingHint', 'ParameterHint' },
})

Using Lualine Themes

There are two Lualine themes, 'lighthaus', and 'lighthaus_dark'. Use the one that corresponds to your selected Lighthaus theme.

Setup:

require('lualine').setup({
  options = {
    -- your other options here
    theme = 'lighthaus', -- or theme = 'lighthaus_dark'
  },
  -- your other lualine config here
})

Terminal Themes

Notes

lighthaus.nvim's People

Contributors

marcelarie avatar mrjones2014 avatar starbix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

lighthaus.nvim's Issues

Missing cursorline highlight?

Hey! Great work with the theme, I like it :) I'd just consider adding an highlight for the cursorline, as there is none at the moment.

Keep up the great work!

`colorcolumn` on top of plain text

I tried loading the settings before and after the plugin loads with not effect.

lightbug
Here is the same line with visual lne to highlight the missing text:
lightbug 2

My lighthaus.nvim setup:

require("lighthaus").setup({
	bg_dark = vim.env.SYS_THEME == "dark" and true or false,
	colors = {
		black = "#111111",
		fg_nc_statusline = "#888888",
	},
	lsp_underline_style = "undercurl",
})
-- maybe this command it's the cause ?
vim.cmd("highlight ColorColumn ctermbg=0 guibg=#111111")

On my config I have vim.wo.colorcolumn = "80" too.

version: NVIM v0.7.0-dev

`nvim-treesitter` highlight missing in some diff files

I found this issue with gitcommit and diff files.

my lighthaus and treesitter config:

require("nvim-treesitter.configs").setup {
	auto_install = true,
	highlight = {
		enable = true,
		additional_vim_regex_highlighting = false,
	},
}

require("lighthaus").setup {
	bg_dark = true,
	colors = {
		-- black = '#0E0E10',
		-- black = '#1e1d23',
		black = "#111111",
		fg_nc_statusline = "#888888",
		red = "#FC2929",
		red2 = "#FF5050",
		blue = "#1D918B",
		blue2 = "#47A8A1",
		blue3 = "#0db9d7",
		hl_yellow = "#FFFF00",
		hl_orange = "#FF4D00",
		hl_bg = "#fff",
		hl_bg_dark = "#282c34",
		gutter_bg = "#282c34",
		non_text = "#373C45",
		lsp_error = "#db4b4b",
		lsp_warning = "#e0af68",
		lsp_information = "#0db9d7",
		lsp_hint = "#10B981",
		-- bg = 'Red'
	},
	lsp_underline_style = "undercurl",
}

some examples:

lightaus.nvim:
Screenshot 2023-01-07 at 12 49 02

catppuccin:
Screenshot 2023-01-07 at 12 49 15

the diff file:

diff --git a/apps/dashboard-v2/shared/containers/ScheduledJobsPage/ScheduledJobsTableAdvancedSearch.tsx b/apps/dashboard-v2/shared/containers/ScheduledJobsPage/ScheduledJobsTableAdvancedSearch.tsx
index a83ecd575..33a4a4e16 100644
--- a/apps/dashboard-v2/shared/containers/ScheduledJobsPage/ScheduledJobsTableAdvancedSearch.tsx
+++ b/apps/dashboard-v2/shared/containers/ScheduledJobsPage/ScheduledJobsTableAdvancedSearch.tsx
@@ -1,5 +1,5 @@
 import { useMemo } from "react";
-import { Column, TableState, CellValue, Row } from "react-table";
+import { TableState, CellValue, Row } from "react-table";
 import { useHistory } from "react-router-dom";
 import { DateTime } from "luxon";
 
@@ -44,137 +44,133 @@ const ScheduledJobsTableAvancedTable = ({
   const { push } = useHistory();
 
   const columns = useMemo(
-    () =>
-      [
-        {
-          id: "jobDate",
-          Header: datetimeColumn.name,
-          accessor: (originalRow) => new Date(getDate(originalRow)),
-          Cell: ({ value, row: { original } }: CellValue) => {
-            const date = DateTime.fromJSDate(value).toFormat("dd/MM/yyyy");
-            return <span id={`jobDate-${original.id}`}>{date}</span>;
-          },
-          sortType: "datetime",
+    () => [
+      {
+        id: "jobDate",
+        Header: datetimeColumn.name,
+        accessor: (originalRow: Job) => new Date(getDate(originalRow)),
+        Cell: ({ value, row: { original } }: CellValue) => {
+          const date = DateTime.fromJSDate(value).toFormat("dd/MM/yyyy");
+          return <span id={`jobDate-${original.id}`}>{date}</span>;
         },
-        {
-          id: "deliveryId",
-          Header: (
-            <FormattedMessage
-              id="PackageTable.package_id"
-              defaultMessage="Package ID"
-            />
-          ),
-          accessor: (originalRow) => originalRow.deliveries,
-          Cell: ({ value }: CellValue) =>
-            value.map((delivery: Delivery, index: number) => (
-              <div
-                id={`packageId-${delivery.id}}`}
-                key={delivery.id}
-                className={cx({
-                  [layoutStyles.mbs]: index !== value.length - 1,
-                })}
-              >
-                <CopyButton
-                  id={`copyButton-${delivery.id}`}
-                  text={delivery.id as string}
-                />
-              </div>
-            )),
-          disableSortBy: true,
-          minWidth: 160,
-        },
-        {
-          id: "clientReference",
-          Header: clientReferenceColumn.name,
-          accessor: (originalRow) => originalRow.deliveries,
-          disableSortBy: true,
-          Cell: ({ value }: CellValue) =>
-            value.map((delivery: Delivery, index: number) => (
-              <div
-                id={`clientReference-${delivery.id}}`}
-                key={delivery.id}
-                className={cx({
-                  [layoutStyles.mbm]: index !== value.length - 1,
-                })}
-              >
-                {delivery.clientReference ? (
-                  <span>{delivery.clientReference}</span>
-                ) : (
-                  <FormattedMessage id="jobTable.none" defaultMessage="None" />
-                )}
-              </div>
-            )),
-        },
-        {
-          id: "PU Time",
-          Header: (
-            <FormattedMessage
-              id="jobTable.pickupTime"
-              defaultMessage="Pick-up time"
-            />
-          ),
-          accessor: (originalRow) => originalRow,
-          disableSortBy: true,
-          Cell: ({ value }: CellValue) => (
-            <p id={`pickupAtTime-${value.id}`}>
-              <FormattedTime value={value.pickupAt} />
-            </p>
-          ),
-        },
-        {
-          id: "PU",
-          Header: pickUpColumn.name,
-          accessor: (originalRow) => originalRow.deliveries,
-          disableSortBy: true,
-          width: 300,
-          Cell: ({ value }: CellValue) =>
-            value.map((delivery: Delivery, index: number) => (
-              <div
-                id={`pickUpAddress-${delivery.id}}`}
-                key={delivery.id}
-                className={cx({
-                  [layoutStyles.mbm]: index !== value.length - 1,
-                })}
-              >
-                {delivery.pickup.address && (
-                  <Address address={delivery.dropoff.address}>
-                    {(m) => <span className={styles.placeAddress}>{m}</span>}
-                  </Address>
-                )}
-              </div>
-            )),
-        },
-        {
-          id: "DO",
-          Header: dropOffColumn.name,
-          accessor: (originalRow) => originalRow.deliveries,
-          disableSortBy: true,
-          width: 300,
-          Cell: ({ value }: CellValue) =>
-            value.map((delivery: Delivery, index: number) => (
-              <div
-                id={`dropOffAddress-${delivery.id}}`}
-                key={delivery.id}
-                className={cx({
-                  [layoutStyles.mbm]: index !== value.length - 1,
-                })}
-              >
-                {delivery.dropoff.address && (
-                  <Address address={delivery.dropoff.address}>
-                    {(m) => <span className={styles.placeAddress}>{m}</span>}
-                  </Address>
-                )}
-              </div>
-            )),
-        },
-        {
-          id: "action",
-          accessor: (originalRow) => originalRow,
-          disableSortBy: true,
-          Cell: ({ value }: CellValue) =>
-            cancelColumn.renderer(value, { onJobCancelClick }),
-        },
-      ] as Column<Job>[],
+        sortType: "datetime",
+      },
+      {
+        id: "deliveryId",
+        Header: (
+          <FormattedMessage
+            id="PackageTable.package_id"
+            defaultMessage="Package ID"
+          />
+        ),
+        accessor: (originalRow: Job) => originalRow.deliveries,
+        Cell: ({ value }: CellValue) =>
+          value.map((delivery: Delivery, index: number) => (
+            <div
+              id={`packageId-${delivery.id}}`}
+              key={delivery.id}
+              className={cx({
+                [layoutStyles.mbs]: index !== value.length - 1,
+              })}
+            >
+              <CopyButton id={`copyButton-${delivery.id}`} text={delivery.id} />
+            </div>
+          )),
+        disableSortBy: true,
+        minWidth: 160,
+      },
+      {
+        id: "clientReference",
+        Header: clientReferenceColumn.name,
+        accessor: (originalRow: Job) => originalRow.deliveries,
+        disableSortBy: true,
+        Cell: ({ value }: CellValue) =>
+          value.map((delivery: Delivery, index: number) => (
+            <div
+              id={`clientReference-${delivery.id}}`}
+              key={delivery.id}
+              className={cx({
+                [layoutStyles.mbm]: index !== value.length - 1,
+              })}
+            >
+              {delivery.clientReference ? (
+                <span>{delivery.clientReference}</span>
+              ) : (
+                <FormattedMessage id="jobTable.none" defaultMessage="None" />
+              )}
+            </div>
+          )),
+      },
+      {
+        id: "PU Time",
+        Header: (
+          <FormattedMessage
+            id="jobTable.pickupTime"
+            defaultMessage="Pick-up time"
+          />
+        ),
+        accessor: (originalRow: Job) => originalRow,
+        disableSortBy: true,
+        Cell: ({ value }: CellValue) => (
+          <p id={`pickupAtTime-${value.id}`}>
+            <FormattedTime value={value.pickupAt} />
+          </p>
+        ),
+      },
+      {
+        id: "PU",
+        Header: pickUpColumn.name,
+        accessor: (originalRow: Job) => originalRow.deliveries,
+        disableSortBy: true,
+        width: 300,
+        Cell: ({ value }: CellValue) =>
+          value.map((delivery: Delivery, index: number) => (
+            <div
+              id={`pickUpAddress-${delivery.id}}`}
+              key={delivery.id}
+              className={cx({
+                [layoutStyles.mbm]: index !== value.length - 1,
+              })}
+            >
+              {delivery.pickup.address && (
+                <Address address={delivery.dropoff.address}>
+                  {(m) => <span className={styles.placeAddress}>{m}</span>}
+                </Address>
+              )}
+            </div>
+          )),
+      },
+      {
+        id: "DO",
+        Header: dropOffColumn.name,
+        accessor: (originalRow: Job) => originalRow.deliveries,
+        disableSortBy: true,
+        width: 300,
+        Cell: ({ value }: CellValue) =>
+          value.map((delivery: Delivery, index: number) => (
+            <div
+              id={`dropOffAddress-${delivery.id}}`}
+              key={delivery.id}
+              className={cx({
+                [layoutStyles.mbm]: index !== value.length - 1,
+              })}
+            >
+              {delivery.dropoff.address && (
+                <Address address={delivery.dropoff.address}>
+                  {(m) => <span className={styles.placeAddress}>{m}</span>}
+                </Address>
+              )}
+            </div>
+          )),
+      },
+      {
+        id: "action",
+        accessor: (originalRow: Job) => originalRow,
+        disableSortBy: true,
+        Cell: ({ value }: CellValue) =>
+          cancelColumn.renderer(value, { onJobCancelClick }),
+      },
+    ],
     [onJobCancelClick]
   );
 
@@ -185,7 +181,7 @@ const ScheduledJobsTableAvancedTable = ({
           id: "jobDate",
         },
       ],
-    } as Partial<TableState<Job>>;
+    };
   }, []);
 
   const handleOnClick = ({ original: job }: Row<Job>) => {
diff --git a/packages/stuart-ui/CopyButton/index.tsx b/packages/stuart-ui/CopyButton/index.tsx
index 3678c189d..d7f5e86c8 100644
--- a/packages/stuart-ui/CopyButton/index.tsx
+++ b/packages/stuart-ui/CopyButton/index.tsx
@@ -5,7 +5,7 @@ import copyToClipboard from "stuart-libs/copyToClipboard";
 import styles from "./CopyButton.scss";
 
 interface CopyButtonProps {
-  text: string;
+  text: string | number;
   label?: string;
   className?: string;
   id?: string;

Add Alacritty theme

Alacritty is probably just as popular as Kitty so we should offer an Alacritty theme as well.

Error on load (init.lua:129)

Thanks for making this, went to try it out but get this error:

E5108: Error executing lua ...te/pack/paqs/start/lighthaus.nvim/lua/lighthaus/init.lua:129: attempt to index local 'options' (a ni
l value)

Think I have done everything accoding to readme correctly!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.