diff --git a/init.lua b/init.lua index a958ba8..3969fac 100644 --- a/init.lua +++ b/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 - diff --git a/lua/conf/langs/general.lua b/lua/conf/langs/general.lua index 7fb57bd..8c15f5a 100644 --- a/lua/conf/langs/general.lua +++ b/lua/conf/langs/general.lua @@ -1,15 +1,27 @@ -- General configuration vim.g.ale_linters = { - python = {'black', 'flake8'}, - c: {'clang-format'}, - cpp: {'clang-format'} + python = {'black', 'flake8'}, + 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", diff --git a/lua/conf/plugins.lua b/lua/conf/plugins.lua index 9e339ca..dd83922 100644 --- a/lua/conf/plugins.lua +++ b/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'