modified
This commit is contained in:
@@ -1,30 +1,32 @@
|
|||||||
|
--- @type LazyPluginSpec
|
||||||
return {
|
return {
|
||||||
"linrongbin16/gitlinker.nvim",
|
"linrongbin16/gitlinker.nvim",
|
||||||
cmd = {
|
cmd = {
|
||||||
"GitLink",
|
"GitLink",
|
||||||
},
|
},
|
||||||
|
enabled = false,
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
"<leader>gl",
|
"<leader>gl",
|
||||||
"<cmd>GitLink!<CR>",
|
"<cmd>GitLink remote=origin<CR>",
|
||||||
mode = { "v", "n" },
|
mode = { "v", "n" },
|
||||||
desc = "Copies git link to highlighted code",
|
desc = "Copies git link to highlighted code",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>gL",
|
"<leader>gL",
|
||||||
"<cmd>GitLink<CR>",
|
"<cmd>GitLink! remote=origin<CR>",
|
||||||
mode = { "v", "n" },
|
mode = { "v", "n" },
|
||||||
desc = "Opens git link to highlighted code",
|
desc = "Opens git link to highlighted code",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>gb",
|
"<leader>gb",
|
||||||
"<cmd>GitLink! blame<CR>",
|
"<cmd>GitLink blame<CR>",
|
||||||
mode = { "v", "n" },
|
mode = { "v", "n" },
|
||||||
desc = "Copies git blame link to highlighted code",
|
desc = "Copies git blame link to highlighted code",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>gB",
|
"<leader>gB",
|
||||||
"<cmd>GitLink blame<CR>",
|
"<cmd>GitLink! blame<CR>",
|
||||||
mode = { "v", "n" },
|
mode = { "v", "n" },
|
||||||
desc = "Opens git blame link to highlighted code",
|
desc = "Opens git blame link to highlighted code",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,56 +1,31 @@
|
|||||||
return {
|
return {
|
||||||
"pmizio/typescript-tools.nvim",
|
"pmizio/typescript-tools.nvim",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"lvimuser/lsp-inlayhints.nvim",
|
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
},
|
},
|
||||||
|
ft = {
|
||||||
|
"javascript",
|
||||||
|
"javascriptreact",
|
||||||
|
"typescript",
|
||||||
|
"typescriptreact",
|
||||||
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local typescript_tools = require("typescript-tools")
|
local typescript_tools = require("typescript-tools")
|
||||||
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
||||||
local lsp_inlayhints = require("lsp-inlayhints")
|
|
||||||
|
|
||||||
local on_attach = require("taken.core.on_attach")
|
local on_attach = require("taken.core.on_attach")
|
||||||
local capabilities = cmp_nvim_lsp.default_capabilities()
|
local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||||
|
|
||||||
lsp_inlayhints.setup({})
|
|
||||||
|
|
||||||
vim.api.nvim_create_augroup("LspAttach_inlayhints", {})
|
|
||||||
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,
|
|
||||||
})
|
|
||||||
|
|
||||||
typescript_tools.setup({
|
typescript_tools.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
settings = {
|
settings = {
|
||||||
tsserver_file_preferences = {
|
tsserver_file_preferences = {
|
||||||
includeInlayParameterNameHints = "all",
|
|
||||||
includeCompletionsForModuleExports = true,
|
includeCompletionsForModuleExports = true,
|
||||||
quotePreference = "auto",
|
quotePreference = "auto",
|
||||||
},
|
},
|
||||||
javascript = {
|
|
||||||
inlayHints = {
|
|
||||||
includeInlayParameterNameHints = "all",
|
|
||||||
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
|
||||||
includeInlayFunctionParameterTypeHints = true,
|
|
||||||
includeInlayVariableTypeHints = true,
|
|
||||||
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
|
|
||||||
includeInlayPropertyDeclarationTypeHints = true,
|
|
||||||
includeInlayFunctionLikeReturnTypeHints = true,
|
|
||||||
includeInlayEnumMemberValueHints = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
return {
|
|
||||||
"akinsho/toggleterm.nvim",
|
|
||||||
enabled = false,
|
|
||||||
version = "*",
|
|
||||||
cmd = "ToggleTerm",
|
|
||||||
keys = {
|
|
||||||
{ "<leader>bt", ":ToggleTerm direction=float <CR>", desc = "Open terminal" },
|
|
||||||
{ "<leader>bT", ":ToggleTerm direction=horizontal <CR>", desc = "Open horizontal terminal split" },
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
local toggleterm = require("toggleterm")
|
|
||||||
toggleterm.setup({
|
|
||||||
shell = "pwsh.exe -nologo",
|
|
||||||
start_in_insert = true,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user