Compare commits

...

4 Commits

Author SHA1 Message Date
435937ddb8
feat(nvim): enable lsp inlay hints by default
All checks were successful
Check Formatting of Files / Check-Formatting (push) Successful in 1m5s
2024-08-31 04:00:01 -05:00
efaa05fe5d
refactor(nvim): only allow 5 items from lua-latex-symbol in cmp 2024-08-31 03:58:52 -05:00
9787880ec5
refactor(nvim): replace nil_ls with nixd 2024-08-31 03:58:39 -05:00
0c1cd5e246
feat(hm/price): install nixd 2024-08-31 03:58:03 -05:00
3 changed files with 21 additions and 8 deletions

View File

@ -156,6 +156,7 @@ return {
{ {
name = "lua-latex-symbols", name = "lua-latex-symbols",
option = { cache = true }, option = { cache = true },
max_item_count = 5,
trigger_characters = { "\\" }, trigger_characters = { "\\" },
}, },
{ name = "zsh", max_item_count = 5 }, { name = "zsh", max_item_count = 5 },

View File

@ -324,6 +324,10 @@ return {
if capabilities.semanticTokensProvider and capabilities.semanticTokensProvider.full then if capabilities.semanticTokensProvider and capabilities.semanticTokensProvider.full then
require("hlargs").disable_buf(bufnr) require("hlargs").disable_buf(bufnr)
end end
if capabilities.inlayHintProvider and not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }) then
vim.lsp.inlay_hint.enable(true, { bufnr = bufnr })
end
end, end,
}) })
local lspconfig = require("lspconfig") local lspconfig = require("lspconfig")
@ -483,15 +487,22 @@ return {
dap_debug_gui = true, dap_debug_gui = true,
}) })
lspconfig.nil_ls.setup({ -- TODO: Make this more general, this will support my own NixOS config and dot file
-- stuff, but not generally usable for other projects. Would be good to use something
-- like `.nvim.lua` for this or whatever else works 🤷.
lspconfig.nixd.setup({
cmd = { "nixd", "--semantic-tokens=false" },
settings = { settings = {
["nil"] = { nixd = {
formatting = { command = { "nixfmt" } }, nixpkgs = {
nix = { expr = "import <nixpkgs> { }",
maxMemoryMB = 60000, },
flake = { formatting = {
autoArchive = true, command = { "nixfmt" },
autoEvalInputs = true, },
options = {
home_manager = {
expr = '(builtins.getFlake ("git+file://" + toString ./.)).homeConfigurations.price.options',
}, },
}, },
}, },

View File

@ -32,6 +32,7 @@ in
packages = packages =
with pkgs; with pkgs;
[ [
nixd
inkscape inkscape
sqlx-cli sqlx-cli
postgresql postgresql