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.git')
require('conf.ui') 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 for _, file in ipairs(paths) do
require(file) loadfile(file)()
end end

19
lua/conf/langs/general.lua

@ -1,15 +1,27 @@
-- General configuration -- General configuration
vim.g.ale_linters = { vim.g.ale_linters = {
python = {'black', 'flake8'}, python = {'black', 'flake8'},
c: {'clang-format'}, c = {'clang-format'},
cpp: {'clang-format'} cpp = {'clang-format'}
} }
vim.g.ale_fixers = { vim.g.ale_fixers = {
['*'] = {'remove_trailing_lines', 'trim_whitespace'} ['*'] = {'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. -- Treesitter config.
require'nvim-treesitter.configs'.setup { require'nvim-treesitter.configs'.setup {
@ -18,6 +30,7 @@ require'nvim-treesitter.configs'.setup {
"lua", "lua",
"markdown", "markdown",
"python", "python",
"rust",
"query", "query",
"vim", "vim",
"vimdoc", "vimdoc",

5
lua/conf/plugins.lua

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

Loading…
Cancel
Save