Skip to content

Commit

Permalink
Update: Added mason-lspconfig, setup lsp servers
Browse files Browse the repository at this point in the history
  • Loading branch information
BPowell76 committed Jul 29, 2024
1 parent 33181ac commit eb88092
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Put this together for my own use to use across machines at different locations.
### Manager ###

The primary plugin manager used is [vim-plug](https://github.com/junegunn/vim-plug).
[Mason](https://github.com/williamboman/mason.nvim) is also used to help with quickly setting up LSP-related things.

### Neovim Modifiers ###

Expand All @@ -18,3 +17,11 @@ The primary plugin manager used is [vim-plug](https://github.com/junegunn/vim-pl
- [Vim Fugitive](https://github.com/tpope/vim-fugitive)
- [Gitsigns](https://github.com/lewis6991/gitsigns.nvim)

### LSP/Linting/Formatting ###

- [mason](https://github.com/williamboman/mason.nvim))
- [mason-lspconfig](https://github.com/williamboman/mason-lspconfig.nvim)

## Known Issues ##

Telescope('fzf') seems to cause some issues when installed on a first environment (WSL).
24 changes: 21 additions & 3 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Plug('lewis6991/gitsigns.nvim')

-- LSP
Plug('neovim/nvim-lspconfig')
Plug('williamboman/mason-lspconfig.nvim')

-- Treesitter
Plug('nvim-treesitter/nvim-treesitter', { ['do'] = ':TSUpdate'})
Expand All @@ -41,6 +42,26 @@ vim.call('plug#end')

-- call custom config files for plugins
require("mason").setup()
require("mason-lspconfig").setup {
ensure_installed = {
"lua_ls",
"quick_lint_js",
"marksman",
"cssls",
"clangd",
"bashls",
"html"
},
}

-- Require LSP for syntax highlighting
require('lspconfig').quick_lint_js.setup{}
require('lspconfig').lua_ls.setup{}
require('lspconfig').marksman.setup{}
require('lspconfig').cssls.setup{}
require('lspconfig').clangd.setup{}
require('lspconfig').bashls.setup{}
require('lspconfig').html.setup{}

-- Configure Nvim-Tree
require('nvim-tree').setup ({
Expand All @@ -54,9 +75,6 @@ local telescope = require('telescope')
telescope.setup {}
telescope.load_extension('fzf')

-- Require LSP for syntax highlighting
--require'lspconfig'.quick_lint_js.setup{}

-- syntax highlighting
--vim.opt.syntax = 'on'
require'nvim-treesitter.configs'.setup {
Expand Down

0 comments on commit eb88092

Please sign in to comment.