Browse Source

Swap LSP to mason and fix a major bug

master
Taylor Bockman 1 year ago
parent
commit
2df9a819fd
  1. 5
      init.lua
  2. 19
      lua/conf/langs/general.lua
  3. 5
      lua/conf/plugins.lua

5
init.lua

@ -10,9 +10,8 @@ require('conf.search')
require('conf.git')
require('conf.ui')
local paths = vim.fn.glob('lua/conf/langs/*.lua', true, true, true)
local paths = vim.fn.glob(config_path .. 'lua/conf/langs/*.lua', true, true, true)
for _, file in ipairs(paths) do
require(file)
loadfile(file)()
end

19
lua/conf/langs/general.lua

@ -1,15 +1,27 @@
-- General configuration
vim.g.ale_linters = {
python = {'black', 'flake8'},
c: {'clang-format'},
cpp: {'clang-format'}
c = {'clang-format'},
cpp = {'clang-format'}
}
vim.g.ale_fixers = {
['*'] = {'remove_trailing_lines', 'trim_whitespace'}
}
let g:ale_fix_on_save = 1
vim.g.ale_fix_on_save = 1
-- LSP Configurations
require("mason").setup({
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = ""
}
}
})
require("mason-lspconfig").setup()
-- Treesitter config.
require'nvim-treesitter.configs'.setup {
@ -18,6 +30,7 @@ require'nvim-treesitter.configs'.setup {
"lua",
"markdown",
"python",
"rust",
"query",
"vim",
"vimdoc",

5
lua/conf/plugins.lua

@ -43,8 +43,9 @@ Plug('nvim-telescope/telescope-fzf-native.nvim', {['do'] = 'make' })
Plug 'tpope/vim-fugitive'
-- LSP
Plug 'prabirshrestha/vim-lsp'
Plug 'mattn/vim-lsp-settings'
Plug('williamboman/mason.nvim', {['do'] = vim.fn[':MasonUpdate']})
Plug('williamboman/mason-lspconfig.nvim')
Plug('neovim/nvim-lspconfig')
-- Autocomplete
Plug 'prabirshrestha/asyncomplete.vim'

Loading…
Cancel
Save