WIP: Switch to NixOS #5
2 changed files with 22 additions and 7 deletions
|
@ -79,20 +79,25 @@ require('packer').startup(function()
|
||||||
-- Read editorconfig settings
|
-- Read editorconfig settings
|
||||||
use 'editorconfig/editorconfig-vim'
|
use 'editorconfig/editorconfig-vim'
|
||||||
|
|
||||||
-- Install LSP server executables
|
-- Package manager for LSP servers, DAP servers etc.
|
||||||
use {
|
use {
|
||||||
'williamboman/mason.nvim',
|
'williamboman/mason.nvim',
|
||||||
config = function() require('mason').setup {} end
|
config = require('plugins.mason').setup
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- Install LSP server executables with Mason
|
||||||
use {
|
use {
|
||||||
'williamboman/mason-lspconfig.nvim',
|
'williamboman/mason-lspconfig.nvim',
|
||||||
config = function()
|
after = 'mason',
|
||||||
require('mason-lspconfig').setup {automatic_installation = true}
|
config = require('plugins.mason').lspconfig_setup
|
||||||
end
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Configs for built-in LSP
|
-- Configs for built-in LSP
|
||||||
use {'neovim/nvim-lspconfig', config = require('plugins.lspconfig').setup}
|
use {
|
||||||
|
'neovim/nvim-lspconfig',
|
||||||
|
after = 'mason-lspconfig',
|
||||||
|
config = require('plugins.lspconfig').setup
|
||||||
|
}
|
||||||
|
|
||||||
-- Additional LSP features for Java
|
-- Additional LSP features for Java
|
||||||
use 'mfussenegger/nvim-jdtls'
|
use 'mfussenegger/nvim-jdtls'
|
||||||
|
@ -121,7 +126,7 @@ require('packer').startup(function()
|
||||||
{'hrsh7th/cmp-path'}, -- Path source
|
{'hrsh7th/cmp-path'}, -- Path source
|
||||||
{'saadparwaiz1/cmp_luasnip'} -- Snippets source
|
{'saadparwaiz1/cmp_luasnip'} -- Snippets source
|
||||||
},
|
},
|
||||||
config = require('plugins.cmp'),
|
config = require('plugins.cmp')
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Automatic brackets
|
-- Automatic brackets
|
||||||
|
|
10
home/.config/nvim/lua/plugins/mason.lua
Normal file
10
home/.config/nvim/lua/plugins/mason.lua
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
local opts = {mason = {}, lspconfig = {automatic_installation = true}}
|
||||||
|
|
||||||
|
M.setup = function() require('mason').setup(opts.mason) end
|
||||||
|
|
||||||
|
M.lspconfig_setup =
|
||||||
|
function() require('mason-lspconfig').setup(opts.lspconfig) end
|
||||||
|
|
||||||
|
return M
|
Loading…
Add table
Add a link
Reference in a new issue