瀏覽代碼

Move mason setup up further

This helps if a user needs to find a mason executable
Anthony Fiddes 3 年之前
父節點
當前提交
36224daa1b
共有 1 個文件被更改,包括 5 次插入 和 5 次删除
  1. 5 5
      init.lua

+ 5 - 5
init.lua

@@ -458,6 +458,11 @@ require('which-key').register {
   ['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
   ['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
 }
 }
 
 
+-- mason-lspconfig requires that these setup functions are called in this order
+-- before setting up the servers.
+require('mason').setup()
+require('mason-lspconfig').setup()
+
 -- Enable the following language servers
 -- Enable the following language servers
 --  Feel free to add/remove any LSPs that you want here. They will automatically be installed.
 --  Feel free to add/remove any LSPs that you want here. They will automatically be installed.
 --
 --
@@ -489,11 +494,6 @@ require('neodev').setup()
 local capabilities = vim.lsp.protocol.make_client_capabilities()
 local capabilities = vim.lsp.protocol.make_client_capabilities()
 capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
 capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
 
 
--- mason-lspconfig requires that these setup functions are called in this order
--- before setting up the servers.
-require('mason').setup()
-require('mason-lspconfig').setup()
-
 -- Ensure the servers above are installed
 -- Ensure the servers above are installed
 local mason_lspconfig = require 'mason-lspconfig'
 local mason_lspconfig = require 'mason-lspconfig'