update and remove lsp inlay deprecated plugin
This commit is contained in:
parent
030882309d
commit
7fdfc21a4d
6 changed files with 23 additions and 121 deletions
41
flake.lock
generated
41
flake.lock
generated
|
@ -2,11 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743520842,
|
"lastModified": 1743540843,
|
||||||
"narHash": "sha256-5lWR/Ku1xrwDGacNRyCUrCYr66AdR6BntH6vfHUpZns=",
|
"narHash": "sha256-Ka76kI2KicJU308hBTYQa1HpIHrruXZre5hAgoRxCw0=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "963f97c0792f299d42f6ff9245618383bbce825e",
|
"rev": "243b4cf508cd57e8c6c55e6d5e2a3f55aca08771",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -34,11 +34,11 @@
|
||||||
"nvim_plugin-CopilotC-Nvim/CopilotChat.nvim": {
|
"nvim_plugin-CopilotC-Nvim/CopilotChat.nvim": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743194081,
|
"lastModified": 1743526782,
|
||||||
"narHash": "sha256-hZarRYiTt2ki6Aun0mGGj6+BZVV1oVVdGUvAJxbcLO0=",
|
"narHash": "sha256-UEZ+kO1I5eO7wNf10wWuyE7UHqJRChzzx9n06/exZfo=",
|
||||||
"owner": "CopilotC-Nvim",
|
"owner": "CopilotC-Nvim",
|
||||||
"repo": "CopilotChat.nvim",
|
"repo": "CopilotChat.nvim",
|
||||||
"rev": "cd82b6b9c4cfb254218f5782cc3339e05cbb9989",
|
"rev": "23162ada224e858d0d60bbbf2a35f9b6c98427ce",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -82,11 +82,11 @@
|
||||||
"nvim_plugin-MeanderingProgrammer/render-markdown.nvim": {
|
"nvim_plugin-MeanderingProgrammer/render-markdown.nvim": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743484308,
|
"lastModified": 1743531972,
|
||||||
"narHash": "sha256-mAP4AJBFyprbro2LN2ySUjbpFeM5epv4kLqnsy4hLcA=",
|
"narHash": "sha256-iv4tde7/BlTtaG9p3OEQ6C+3uMnVAr8fLoPsGwlMQVY=",
|
||||||
"owner": "MeanderingProgrammer",
|
"owner": "MeanderingProgrammer",
|
||||||
"repo": "render-markdown.nvim",
|
"repo": "render-markdown.nvim",
|
||||||
"rev": "92256e02db70c474f97fc461b6b6bc4aff7a499a",
|
"rev": "1e2e9a386fbe41b869d3d0e000e19db72284585b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -415,22 +415,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nvim_plugin-lvimuser/lsp-inlayhints.nvim": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1686236485,
|
|
||||||
"narHash": "sha256-06CiJ+xeMO4+OJkckcslqwloJyt2gwg514JuxV6KOfQ=",
|
|
||||||
"owner": "lvimuser",
|
|
||||||
"repo": "lsp-inlayhints.nvim",
|
|
||||||
"rev": "d981f65c9ae0b6062176f0accb9c151daeda6f16",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "lvimuser",
|
|
||||||
"repo": "lsp-inlayhints.nvim",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nvim_plugin-m4xshen/hardtime.nvim": {
|
"nvim_plugin-m4xshen/hardtime.nvim": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -882,11 +866,11 @@
|
||||||
"nvim_plugin-yetone/avante.nvim": {
|
"nvim_plugin-yetone/avante.nvim": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743434909,
|
"lastModified": 1743521391,
|
||||||
"narHash": "sha256-Gu7ZY1jKCU+s+Ndq5+myonntKsvCBQN3qzl7JJMutJk=",
|
"narHash": "sha256-8q3xF9SiM/uJzHVaynn71p4yftMw5ZkiquzXXcOeSf0=",
|
||||||
"owner": "yetone",
|
"owner": "yetone",
|
||||||
"repo": "avante.nvim",
|
"repo": "avante.nvim",
|
||||||
"rev": "7dc5560909ebf5dc5a12eb9260045328032d6793",
|
"rev": "06757e8bf57175da45180a26840c5db1f38cb4d9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -955,7 +939,6 @@
|
||||||
"nvim_plugin-lewis6991/gitsigns.nvim": "nvim_plugin-lewis6991/gitsigns.nvim",
|
"nvim_plugin-lewis6991/gitsigns.nvim": "nvim_plugin-lewis6991/gitsigns.nvim",
|
||||||
"nvim_plugin-lnc3l0t/glow.nvim": "nvim_plugin-lnc3l0t/glow.nvim",
|
"nvim_plugin-lnc3l0t/glow.nvim": "nvim_plugin-lnc3l0t/glow.nvim",
|
||||||
"nvim_plugin-lukas-reineke/indent-blankline.nvim": "nvim_plugin-lukas-reineke/indent-blankline.nvim",
|
"nvim_plugin-lukas-reineke/indent-blankline.nvim": "nvim_plugin-lukas-reineke/indent-blankline.nvim",
|
||||||
"nvim_plugin-lvimuser/lsp-inlayhints.nvim": "nvim_plugin-lvimuser/lsp-inlayhints.nvim",
|
|
||||||
"nvim_plugin-m4xshen/hardtime.nvim": "nvim_plugin-m4xshen/hardtime.nvim",
|
"nvim_plugin-m4xshen/hardtime.nvim": "nvim_plugin-m4xshen/hardtime.nvim",
|
||||||
"nvim_plugin-mbbill/undotree": "nvim_plugin-mbbill/undotree",
|
"nvim_plugin-mbbill/undotree": "nvim_plugin-mbbill/undotree",
|
||||||
"nvim_plugin-mfussenegger/nvim-lint": "nvim_plugin-mfussenegger/nvim-lint",
|
"nvim_plugin-mfussenegger/nvim-lint": "nvim_plugin-mfussenegger/nvim-lint",
|
||||||
|
|
11
flake.nix
11
flake.nix
|
@ -127,8 +127,6 @@
|
||||||
"nvim_plugin-mrcjkb/rustaceanvim".flake = false;
|
"nvim_plugin-mrcjkb/rustaceanvim".flake = false;
|
||||||
"nvim_plugin-Saecki/crates.nvim".url = "github:Saecki/crates.nvim";
|
"nvim_plugin-Saecki/crates.nvim".url = "github:Saecki/crates.nvim";
|
||||||
"nvim_plugin-Saecki/crates.nvim".flake = false;
|
"nvim_plugin-Saecki/crates.nvim".flake = false;
|
||||||
"nvim_plugin-lvimuser/lsp-inlayhints.nvim".url = "github:lvimuser/lsp-inlayhints.nvim";
|
|
||||||
"nvim_plugin-lvimuser/lsp-inlayhints.nvim".flake = false;
|
|
||||||
"nvim_plugin-rafamadriz/friendly-snippets".url = "github:rafamadriz/friendly-snippets";
|
"nvim_plugin-rafamadriz/friendly-snippets".url = "github:rafamadriz/friendly-snippets";
|
||||||
"nvim_plugin-rafamadriz/friendly-snippets".flake = false;
|
"nvim_plugin-rafamadriz/friendly-snippets".flake = false;
|
||||||
"nvim_plugin-ron/ron.vim".url = "github:ron-rs/ron.vim";
|
"nvim_plugin-ron/ron.vim".url = "github:ron-rs/ron.vim";
|
||||||
|
@ -155,7 +153,12 @@
|
||||||
# Utilities
|
# Utilities
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
# Define the systems to support (all Linux systems exposed by nixpkgs)
|
# Define the systems to support (all Linux systems exposed by nixpkgs)
|
||||||
systems = lib.unique (lib.concatLists [ lib.systems.flakeExposed lib.platforms.linux ]);
|
systems = lib.unique (
|
||||||
|
lib.concatLists [
|
||||||
|
lib.systems.flakeExposed
|
||||||
|
lib.platforms.linux
|
||||||
|
]
|
||||||
|
);
|
||||||
forAllSystems = lib.genAttrs systems;
|
forAllSystems = lib.genAttrs systems;
|
||||||
# Create a mapping from system to corresponding nixpkgs : https://nixos.wiki/wiki/Overlays#In_a_Nix_flake
|
# Create a mapping from system to corresponding nixpkgs : https://nixos.wiki/wiki/Overlays#In_a_Nix_flake
|
||||||
nixpkgsFor = forAllSystems (system: (nixpkgs.legacyPackages.${system}.extend rustOverlay));
|
nixpkgsFor = forAllSystems (system: (nixpkgs.legacyPackages.${system}.extend rustOverlay));
|
||||||
|
@ -254,7 +257,7 @@
|
||||||
rustywind
|
rustywind
|
||||||
markdownlint-cli2
|
markdownlint-cli2
|
||||||
# LSPs
|
# LSPs
|
||||||
python312Packages.tiktoken # needed for copilot chat
|
# python312Packages.tiktoken # needed for copilot chat
|
||||||
nil # nix
|
nil # nix
|
||||||
lua-language-server
|
lua-language-server
|
||||||
vscode-langservers-extracted # HTML/CSS/JSON/ESLint
|
vscode-langservers-extracted # HTML/CSS/JSON/ESLint
|
||||||
|
|
|
@ -6,7 +6,8 @@ vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
group = group,
|
group = group,
|
||||||
desc = "Highlight when yanking (copying) text",
|
desc = "Highlight when yanking (copying) text",
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.highlight.on_yank({ timeout = 200 })
|
-- vim.highlight.on_yank({ timeout = 200 })
|
||||||
|
vim.hl.on_yank({ timeout = 200 })
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -26,69 +26,6 @@ return {
|
||||||
main = "copilot",
|
main = "copilot",
|
||||||
},
|
},
|
||||||
{ "zbirenbaum/copilot-cmp", opts = {}, main = "copilot_cmp" },
|
{ "zbirenbaum/copilot-cmp", opts = {}, main = "copilot_cmp" },
|
||||||
{
|
|
||||||
"CopilotC-Nvim/CopilotChat.nvim",
|
|
||||||
branch = "canary",
|
|
||||||
dependencies = {
|
|
||||||
{ "zbirenbaum/copilot.lua" }, -- or github/copilot.vim
|
|
||||||
{ "nvim-lua/plenary.nvim" }, -- for curl, log wrapper
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
chat_autocomplete = true,
|
|
||||||
mappings = {
|
|
||||||
complete = {
|
|
||||||
insert = "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
window = {
|
|
||||||
layout = "float",
|
|
||||||
relative = "cursor",
|
|
||||||
width = 1,
|
|
||||||
height = 0.4,
|
|
||||||
row = 1,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>ch",
|
|
||||||
function()
|
|
||||||
local actions = require("CopilotChat.actions")
|
|
||||||
require("CopilotChat.integrations.telescope").pick(actions.help_actions())
|
|
||||||
end,
|
|
||||||
desc = "CopilotChat - Help actions",
|
|
||||||
mode = { "n", "v", "x" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>cp",
|
|
||||||
function()
|
|
||||||
local actions = require("CopilotChat.actions")
|
|
||||||
require("CopilotChat.integrations.telescope").pick(actions.prompt_actions())
|
|
||||||
end,
|
|
||||||
desc = "CopilotChat - Prompt actions",
|
|
||||||
mode = { "n", "v", "x" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>cq",
|
|
||||||
function()
|
|
||||||
local input = vim.fn.input("Quick Chat: ")
|
|
||||||
if input ~= "" then
|
|
||||||
require("CopilotChat").ask(input, { selection = require("CopilotChat.select").buffer })
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
desc = "CopilotChat - Quick chat",
|
|
||||||
mode = { "n", "v", "x" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>cc",
|
|
||||||
function()
|
|
||||||
require("CopilotChat").toggle()
|
|
||||||
end,
|
|
||||||
desc = "CopilotChat - Toggle",
|
|
||||||
mode = { "n", "v", "x" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- See Commands section for default commands if you want to lazy load on them
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
-- See `:help cmp`
|
-- See `:help cmp`
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
local function lsp_clients()
|
local function lsp_clients()
|
||||||
local clients = {}
|
local clients = {}
|
||||||
for _, client in pairs(vim.lsp.buf_get_clients(0)) do
|
for _, client in pairs(vim.lsp.get_clients()) do
|
||||||
clients[#clients + 1] = client.name
|
clients[#clients + 1] = client.name
|
||||||
end
|
end
|
||||||
table.sort(clients)
|
table.sort(clients)
|
||||||
|
@ -9,7 +9,7 @@ end
|
||||||
|
|
||||||
local function langs()
|
local function langs()
|
||||||
local l = {}
|
local l = {}
|
||||||
for _, client in pairs(vim.lsp.buf_get_clients(0)) do
|
for _, client in pairs(vim.lsp.get_clients()) do
|
||||||
local out = nil
|
local out = nil
|
||||||
if client.name == "pyright" then
|
if client.name == "pyright" then
|
||||||
out = vim.fn.system({ "python", "-V" })
|
out = vim.fn.system({ "python", "-V" })
|
||||||
|
|
|
@ -32,28 +32,6 @@ return {
|
||||||
event = "BufEnter",
|
event = "BufEnter",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "hrsh7th/nvim-cmp" },
|
{ "hrsh7th/nvim-cmp" },
|
||||||
{
|
|
||||||
"lvimuser/lsp-inlayhints.nvim",
|
|
||||||
init = function()
|
|
||||||
vim.api.nvim_create_augroup("LspAttach_inlayhints", { clear = true })
|
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
|
||||||
group = "LspAttach_inlayhints",
|
|
||||||
callback = function(args)
|
|
||||||
if not (args.data and args.data.client_id) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local bufnr = args.buf
|
|
||||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
|
||||||
require("lsp-inlayhints").on_attach(client, bufnr)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
opts = {
|
|
||||||
type_hints = { prefix = " ::" },
|
|
||||||
},
|
|
||||||
main = "lsp-inlayhints",
|
|
||||||
},
|
|
||||||
{ "b0o/schemastore.nvim" },
|
{ "b0o/schemastore.nvim" },
|
||||||
-- Automatically install LSPs and related tools to stdpath for Neovim
|
-- Automatically install LSPs and related tools to stdpath for Neovim
|
||||||
{ "williamboman/mason.nvim", enabled = not NIX, config = true }, -- NOTE: Must be loaded before dependants
|
{ "williamboman/mason.nvim", enabled = not NIX, config = true }, -- NOTE: Must be loaded before dependants
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue