further attempt for inlay hints
parent
d4834a446c
commit
328df3060f
|
@ -395,7 +395,7 @@ remap('n', '<leader>gs', function() require('neogit').open({}) end);
|
||||||
-- LSP settings
|
-- LSP settings
|
||||||
-- This function gets run when an LSP connects to a particular buffer.
|
-- This function gets run when an LSP connects to a particular buffer.
|
||||||
require("inlay-hints").setup {
|
require("inlay-hints").setup {
|
||||||
only_current_line = true,
|
only_current_line = false,
|
||||||
eol = {
|
eol = {
|
||||||
right_align = true,
|
right_align = true,
|
||||||
}
|
}
|
||||||
|
@ -440,10 +440,11 @@ local on_attach = function(client, bufnr)
|
||||||
nmap('<leader>wl', function()
|
nmap('<leader>wl', function()
|
||||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
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')
|
end, '[W]orkspace [L]ist Folders')
|
||||||
|
|
||||||
|
-- enable inlay hints if available
|
||||||
|
require('inlay-hints').on_attach(client, bufnr)
|
||||||
|
|
||||||
end
|
end
|
||||||
-- nvim-cmp
|
-- nvim-cmp
|
||||||
local cmp = require 'cmp'
|
local cmp = require 'cmp'
|
||||||
|
@ -678,7 +679,7 @@ require("rust-tools").setup {
|
||||||
inlay_hints = {
|
inlay_hints = {
|
||||||
-- automatically set inlay hints (type hints)
|
-- automatically set inlay hints (type hints)
|
||||||
-- default: true
|
-- default: true
|
||||||
auto = true,
|
auto = false,
|
||||||
|
|
||||||
-- Only show inlay hints for the current line
|
-- Only show inlay hints for the current line
|
||||||
only_current_line = false,
|
only_current_line = false,
|
||||||
|
|
|
@ -30,7 +30,6 @@ let
|
||||||
proj_root = builtins.toString ./../..;
|
proj_root = builtins.toString ./../..;
|
||||||
# TODO: put this in a seperate library
|
# TODO: put this in a seperate library
|
||||||
# callPackage supports both PATH and function as first param!
|
# callPackage supports both PATH and function as first param!
|
||||||
# TODO: support yaml string with writeTextFile (provided by callPackge)
|
|
||||||
yamlToJsonDrv = yamlContent: outputPath: pkgs.callPackage ({ runCommand }:
|
yamlToJsonDrv = yamlContent: outputPath: pkgs.callPackage ({ runCommand }:
|
||||||
# runCommand source: https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/trivial-builders.nix#L33
|
# runCommand source: https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/trivial-builders.nix#L33
|
||||||
runCommand outputPath { inherit yamlContent; nativeBuildInputs = [ pkgs.yq ]; }
|
runCommand outputPath { inherit yamlContent; nativeBuildInputs = [ pkgs.yq ]; }
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, ... }:
|
outputs = { self, nixpkgs, ... }:
|
||||||
|
|
Loading…
Reference in New Issue