Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LspInlayHint color and update plugin dependencies. #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,8 @@ vim.cmd.cnoreabbrev([[git Git]])
vim.cmd.cnoreabbrev([[gp Git push]])
vim.cmd.cnoreabbrev([[Gbrowse GBrowse]])
vim.api.nvim_set_hl(0, "TSVariable", { link = "Normal" })
vim.cmd([[
hi LspInlayHint guifg=#d8d8d8 guibg=#3a3a3a
]])
vim.g.copilot_no_tab_map = true
vim.g.copilot_assume_mapped = true
2 changes: 1 addition & 1 deletion lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"im-select.nvim": { "branch": "master", "commit": "2300c31be9e3071789b8d864d846b63f265f983d" },
"indent-blankline.nvim": { "branch": "master", "commit": "c4c203c3e8a595bc333abaf168fcb10c13ed5fb7" },
"lazy.nvim": { "branch": "main", "commit": "c389ad552bd5c2050783ac6cd6e54f5fbba3c7bc" },
"lsp-inlayhints.nvim": { "branch": "anticonceal", "commit": "b35fa5b3e7051e3f8d3165028508d81ef5e4604a" },
"lspkind.nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" },
"lspsaga.nvim": { "branch": "main", "commit": "b7b4777369b441341b2dcd45c738ea4167c11c9e" },
"lualine-copilot": { "branch": "main", "commit": "94c14f6d2b68534288476118b0d9f8f7027c2b6a" },
Expand Down Expand Up @@ -59,7 +60,6 @@
"specs.nvim": { "branch": "main", "commit": "2743e412bbe21c9d73954c403d01e8de7377890d" },
"symbols-outline.nvim": { "branch": "master", "commit": "6a3ed24c5631da7a5d418bced57c16b32af7747c" },
"telescope.nvim": { "branch": "master", "commit": "2f32775405f6706348b71d0bb8a15a22852a61e4" },
"term-edit.nvim": { "branch": "master", "commit": "9efbb3298ce63807750a415a091d7d535ff0a7e8" },
"toggleterm.nvim": { "branch": "main", "commit": "19aad0f41f47affbba1274f05e3c067e6d718e1e" },
"undotree": { "branch": "master", "commit": "1a23ea84bd02c34f50d8e10a8b4bfc89597ffe4e" },
"vim-be-good": { "branch": "master", "commit": "c290810728a4f75e334b07dc0f3a4cdea908d351" },
Expand Down
4 changes: 4 additions & 0 deletions lua/lsp_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ end
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})

local on_attach = function(client, bufnr)
require("lsp-inlayhints").on_attach(client, bufnr)
if client.supports_method("textDocument/formatting") then
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
vim.api.nvim_create_autocmd("BufWritePre", {
Expand Down Expand Up @@ -285,6 +286,9 @@ nvim_lsp.gopls.setup({
capabilities = capabilities,
settings = {
gopls = {
hints = {
parameterNames = true,
},
-- PAINPOINT
usePlaceholders = true,
experimentalPostfixCompletions = true,
Expand Down
19 changes: 18 additions & 1 deletion lua/plugins/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ return {
})
end,
},
{
"lvimuser/lsp-inlayhints.nvim",
event = "VeryLazy",
dev = true,
branch = "anticonceal",
config = function()
require("lsp-inlayhints").setup()
end,
},
{
"folke/neodev.nvim",
event = "VeryLazy",
Expand Down Expand Up @@ -60,6 +69,14 @@ return {
require("fidget").setup()
end,
},
{ "ray-x/go.nvim", event = "VeryLazy" },
{
"ray-x/go.nvim",
event = "VeryLazy",
config = function()
require("go").setup({
lsp_inlay_hints = { enable = false },
})
end,
},
{ "ray-x/guihua.lua", event = "VeryLazy" },
}
1 change: 0 additions & 1 deletion lua/plugins/snippet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ return {
})
require("luasnip.loaders.from_vscode").lazy_load({ paths = { "/Users/jingdizhu/.config/nvim/my_snippets" } })
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/my_snippets/lua/" })
require("go").setup({})
end,
dependencies = {
"rafamadriz/friendly-snippets",
Expand Down