From 328df3060fdf9493dceb818060f5e3ba4cba11fc Mon Sep 17 00:00:00 2001 From: pegasust Date: Thu, 8 Dec 2022 07:12:55 +0000 Subject: [PATCH] further attempt for inlay hints --- neovim/init.lua | 9 +++++---- nix-conf/home-manager/home.nix | 1 - nix-conf/system/flake.nix | 2 -- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/neovim/init.lua b/neovim/init.lua index 0027e96..c27aaa5 100644 --- a/neovim/init.lua +++ b/neovim/init.lua @@ -395,7 +395,7 @@ remap('n', 'gs', function() require('neogit').open({}) end); -- LSP settings -- This function gets run when an LSP connects to a particular buffer. require("inlay-hints").setup { - only_current_line = true, + only_current_line = false, eol = { right_align = true, } @@ -440,10 +440,11 @@ local on_attach = function(client, bufnr) nmap('wl', function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) - -- enable inlay hints if available - require('inlay-hints').on_attach(client, bufnr) end, '[W]orkspace [L]ist Folders') + -- enable inlay hints if available + require('inlay-hints').on_attach(client, bufnr) + end -- nvim-cmp local cmp = require 'cmp' @@ -678,7 +679,7 @@ require("rust-tools").setup { inlay_hints = { -- automatically set inlay hints (type hints) -- default: true - auto = true, + auto = false, -- Only show inlay hints for the current line only_current_line = false, diff --git a/nix-conf/home-manager/home.nix b/nix-conf/home-manager/home.nix index aa3d3fb..e7c4d38 100644 --- a/nix-conf/home-manager/home.nix +++ b/nix-conf/home-manager/home.nix @@ -30,7 +30,6 @@ let proj_root = builtins.toString ./../..; # TODO: put this in a seperate library # callPackage supports both PATH and function as first param! - # TODO: support yaml string with writeTextFile (provided by callPackge) yamlToJsonDrv = yamlContent: outputPath: pkgs.callPackage ({ runCommand }: # runCommand source: https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/trivial-builders.nix#L33 runCommand outputPath { inherit yamlContent; nativeBuildInputs = [ pkgs.yq ]; } diff --git a/nix-conf/system/flake.nix b/nix-conf/system/flake.nix index e7d6a96..32d0125 100644 --- a/nix-conf/system/flake.nix +++ b/nix-conf/system/flake.nix @@ -1,8 +1,6 @@ { inputs = { nixpkgs.url = "nixpkgs/nixos-unstable"; - home-manager.url = "github:nix-community/home-manager"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { self, nixpkgs, ... }: