from-scratch rewrite #1
@@ -4,8 +4,23 @@ return {
 | 
			
		||||
    { "williamboman/mason.nvim", opts = {} },
 | 
			
		||||
    "williamboman/mason-lspconfig.nvim",
 | 
			
		||||
    "WhoIsSethDaniel/mason-tool-installer.nvim",
 | 
			
		||||
    "yioneko/nvim-vtsls",
 | 
			
		||||
    opts = {
 | 
			
		||||
      settings = {
 | 
			
		||||
        typescript = {
 | 
			
		||||
          inlayHints = {
 | 
			
		||||
            parameterNames = { enabled = "literals" },
 | 
			
		||||
            parameterTypes = { enabled = true },
 | 
			
		||||
            variableTypes = { enabled = true },
 | 
			
		||||
            propertyDeclarationTypes = { enabled = true },
 | 
			
		||||
            functionLikeReturnTypes = { enabled = true },
 | 
			
		||||
            enumMemberValues = { enabled = true },
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    { "j-hui/fidget.nvim", opts = {} },
 | 
			
		||||
    { "j-hui/fidget.nvim",       opts = {} },
 | 
			
		||||
 | 
			
		||||
    "saghen/blink.cmp",
 | 
			
		||||
  },
 | 
			
		||||
@@ -14,6 +29,8 @@ return {
 | 
			
		||||
    diagnostics = { virtual_text = true },
 | 
			
		||||
  },
 | 
			
		||||
  config = function()
 | 
			
		||||
    inlay_hints = { enabled = true }
 | 
			
		||||
    diagnostics = { virtual_text = true }
 | 
			
		||||
    vim.api.nvim_create_autocmd("LspAttach", {
 | 
			
		||||
      group = vim.api.nvim_create_augroup("kickstart-lsp-attach", { clear = true }),
 | 
			
		||||
      callback = function(event)
 | 
			
		||||
@@ -70,7 +87,7 @@ return {
 | 
			
		||||
 | 
			
		||||
        local client = vim.lsp.get_client_by_id(event.data.client_id)
 | 
			
		||||
        if
 | 
			
		||||
          client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf)
 | 
			
		||||
            client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf)
 | 
			
		||||
        then
 | 
			
		||||
          local highlight_augroup = vim.api.nvim_create_augroup("kickstart-lsp-highlight", { clear = false })
 | 
			
		||||
          vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
 | 
			
		||||
@@ -161,13 +178,44 @@ return {
 | 
			
		||||
 | 
			
		||||
      rust_analyzer = {},
 | 
			
		||||
      vtsls = {
 | 
			
		||||
        settings = {},
 | 
			
		||||
        -- explicitly add default filetypes, so that we can extend
 | 
			
		||||
        -- them in related extras
 | 
			
		||||
        filetypes = {
 | 
			
		||||
          "javascript",
 | 
			
		||||
          "javascriptreact",
 | 
			
		||||
          "javascript.jsx",
 | 
			
		||||
          "typescript",
 | 
			
		||||
          "typescriptreact",
 | 
			
		||||
          "typescript.tsx",
 | 
			
		||||
        },
 | 
			
		||||
        settings = {
 | 
			
		||||
          typescript = {
 | 
			
		||||
            updateImportsOnFileMove = { enabled = "always" },
 | 
			
		||||
            inlayHints = {
 | 
			
		||||
              parameterNames = { enabled = "literals" },
 | 
			
		||||
              parameterTypes = { enabled = true },
 | 
			
		||||
              variableTypes = { enabled = true },
 | 
			
		||||
              propertyDeclarationTypes = { enabled = true },
 | 
			
		||||
              functionLikeReturnTypes = { enabled = true },
 | 
			
		||||
              enumMemberValues = { enabled = true },
 | 
			
		||||
            },
 | 
			
		||||
            suggest = {
 | 
			
		||||
              completeFunctionCalls = true,
 | 
			
		||||
            },
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
 | 
			
		||||
      bashls = {},
 | 
			
		||||
      prismals = {},
 | 
			
		||||
      gopls = {},
 | 
			
		||||
      jsonls = {},
 | 
			
		||||
      eslint = {
 | 
			
		||||
        vim.api.nvim_create_autocmd("BufWritePre", {
 | 
			
		||||
          callback = function()
 | 
			
		||||
            vim.lsp.buf.format()
 | 
			
		||||
          end,
 | 
			
		||||
        }),
 | 
			
		||||
      },
 | 
			
		||||
      lua_ls = {
 | 
			
		||||
        -- cmd = { ... },
 | 
			
		||||
        -- filetypes = { ... },
 | 
			
		||||
@@ -183,11 +231,11 @@ return {
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    local ensure_installed = vim.tbl_keys(servers or {})
 | 
			
		||||
    vim.list_extend(ensure_installed, {
 | 
			
		||||
      "stylua", -- Used to format Lua code
 | 
			
		||||
      "prettierd",
 | 
			
		||||
      "eslint",
 | 
			
		||||
      "codelldb",
 | 
			
		||||
      "gitlab_ci_ls",
 | 
			
		||||
      "js-debug-adapter",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user