diff --git a/config/nvim/lua/plugins/lsp.lua b/config/nvim/lua/plugins/lsp.lua index c4021f3..5eed451 100644 --- a/config/nvim/lua/plugins/lsp.lua +++ b/config/nvim/lua/plugins/lsp.lua @@ -1,139 +1,138 @@ return { - -- tools - { - "williamboman/mason.nvim", - opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { - "stylua", - "selene", - "luacheck", - "shellcheck", - "shfmt", - "tailwindcss-language-server", - "typescript-language-server", - "css-lsp", - }) - end, - }, - - -- lsp servers - { - "neovim/nvim-lspconfig", - opts = { - inlay_hints = { enabled = false }, - ---@type lspconfig.options - servers = { - cssls = {}, - tailwindcss = { - root_dir = function(...) - return require("lspconfig.util").root_pattern(".git")(...) - end, - }, - tsserver = { - root_dir = function(...) - return require("lspconfig.util").root_pattern(".git")(...) - end, - single_file_support = false, - settings = { - typescript = { - inlayHints = { - includeInlayParameterNameHints = "literal", - includeInlayParameterNameHintsWhenArgumentMatchesName = false, - includeInlayFunctionParameterTypeHints = true, - includeInlayVariableTypeHints = false, - includeInlayPropertyDeclarationTypeHints = true, - includeInlayFunctionLikeReturnTypeHints = true, - includeInlayEnumMemberValueHints = true, - }, - }, - javascript = { - inlayHints = { - includeInlayParameterNameHints = "all", - includeInlayParameterNameHintsWhenArgumentMatchesName = false, - includeInlayFunctionParameterTypeHints = true, - includeInlayVariableTypeHints = true, - includeInlayPropertyDeclarationTypeHints = true, - includeInlayFunctionLikeReturnTypeHints = true, - includeInlayEnumMemberValueHints = true, - }, - }, - }, - }, - html = {}, - yamlls = { - settings = { - yaml = { - keyOrdering = false, - }, - }, - }, - lua_ls = { - -- enabled = false, - single_file_support = true, - settings = { - Lua = { - workspace = { - checkThirdParty = false, - }, - completion = { - workspaceWord = true, - callSnippet = "Both", - }, - misc = { - parameters = { - -- "--log-level=trace", - }, - }, - hint = { - enable = true, - setType = false, - paramType = true, - paramName = "Disable", - semicolon = "Disable", - arrayIndex = "Disable", - }, - doc = { - privateName = { "^_" }, - }, - type = { - castNumberToInteger = true, - }, - diagnostics = { - disable = { "incomplete-signature-doc", "trailing-space" }, - -- enable = false, - groupSeverity = { - strong = "Warning", - strict = "Warning", - }, - groupFileStatus = { - ["ambiguity"] = "Opened", - ["await"] = "Opened", - ["codestyle"] = "None", - ["duplicate"] = "Opened", - ["global"] = "Opened", - ["luadoc"] = "Opened", - ["redefined"] = "Opened", - ["strict"] = "Opened", - ["strong"] = "Opened", - ["type-check"] = "Opened", - ["unbalanced"] = "Opened", - ["unused"] = "Opened", - }, - unusedLocalExclude = { "_*" }, - }, - format = { - enable = false, - defaultConfig = { - indent_style = "space", - indent_size = "2", - continuation_indent_size = "2", - }, - }, - }, - }, - }, - }, - setup = {}, - }, - }, + -- tools + { + "williamboman/mason.nvim", + opts = function(_, opts) + vim.list_extend(opts.ensure_installed, { + "stylua", + "selene", + "luacheck", + "shellcheck", + "shfmt", + "tailwindcss-language-server", + "typescript-language-server", + "css-lsp", + }) + end, + }, + -- lsp servers + { + "neovim/nvim-lspconfig", + opts = { + inlay_hints = { enabled = false }, + ---@type lspconfig.options + servers = { + cssls = {}, + tailwindcss = { + root_dir = function(...) + return require("lspconfig.util").root_pattern(".git")(...) + end, + }, + tsserver = { + root_dir = function(...) + return require("lspconfig.util").root_pattern(".git")(...) + end, + single_file_support = false, + settings = { + typescript = { + inlayHints = { + includeInlayParameterNameHints = "literal", + includeInlayParameterNameHintsWhenArgumentMatchesName = false, + includeInlayFunctionParameterTypeHints = true, + includeInlayVariableTypeHints = false, + includeInlayPropertyDeclarationTypeHints = true, + includeInlayFunctionLikeReturnTypeHints = true, + includeInlayEnumMemberValueHints = true, + }, + }, + javascript = { + inlayHints = { + includeInlayParameterNameHints = "all", + includeInlayParameterNameHintsWhenArgumentMatchesName = false, + includeInlayFunctionParameterTypeHints = true, + includeInlayVariableTypeHints = true, + includeInlayPropertyDeclarationTypeHints = true, + includeInlayFunctionLikeReturnTypeHints = true, + includeInlayEnumMemberValueHints = true, + }, + }, + }, + }, + html = {}, + yamlls = { + settings = { + yaml = { + keyOrdering = false, + }, + }, + }, + lua_ls = { + -- enabled = false, + single_file_support = true, + settings = { + Lua = { + workspace = { + checkThirdParty = false, + }, + completion = { + workspaceWord = true, + callSnippet = "Both", + }, + misc = { + parameters = { + -- "--log-level=trace", + }, + }, + hint = { + enable = true, + setType = false, + paramType = true, + paramName = "Disable", + semicolon = "Disable", + arrayIndex = "Disable", + }, + doc = { + privateName = { "^_" }, + }, + type = { + castNumberToInteger = true, + }, + diagnostics = { + disable = { "incomplete-signature-doc", "trailing-space" }, + -- enable = false, + groupSeverity = { + strong = "Warning", + strict = "Warning", + }, + groupFileStatus = { + ["ambiguity"] = "Opened", + ["await"] = "Opened", + ["codestyle"] = "None", + ["duplicate"] = "Opened", + ["global"] = "Opened", + ["luadoc"] = "Opened", + ["redefined"] = "Opened", + ["strict"] = "Opened", + ["strong"] = "Opened", + ["type-check"] = "Opened", + ["unbalanced"] = "Opened", + ["unused"] = "Opened", + }, + unusedLocalExclude = { "_*" }, + }, + format = { + enable = false, + defaultConfig = { + indent_style = "space", + indent_size = "2", + continuation_indent_size = "2", + }, + }, + }, + }, + }, + }, + setup = {}, + }, + }, } diff --git a/config/zsh/aliases/git.aliases.sh b/config/zsh/aliases/git.aliases.sh index 0b343d6..5eb2085 100644 --- a/config/zsh/aliases/git.aliases.sh +++ b/config/zsh/aliases/git.aliases.sh @@ -5,6 +5,7 @@ alias gbd="git branch -D" alias gbv="git for-each-ref --sort=-committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) (%(color:green)%(committerdate:relative)%(color:reset))'" alias gbvv="git branch -vv" alias gcb="git checkout -b" +alias gd='git diff' alias gdc="git diff --cached" alias gh="git hist" alias gl="git l3"