This commit is contained in:
Fabian Imhof 2024-09-20 17:14:49 +02:00
parent 3a798315e9
commit e28f39d75f
1 changed files with 223 additions and 235 deletions

View File

@ -25,6 +25,7 @@ require('lazy').setup({
}, },
}, },
{ 'Bilal2453/luvit-meta', lazy = true }, { 'Bilal2453/luvit-meta', lazy = true },
{
'neovim/nvim-lspconfig', 'neovim/nvim-lspconfig',
dependencies = { dependencies = {
{ 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants { 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants
@ -199,41 +200,29 @@ require('lazy').setup({
fallbackFlags = { '--std=c++20' }, fallbackFlags = { '--std=c++20' },
}, },
}, },
--
lua_ls = { lua_ls = {
-- cmd = {...},
-- filetypes = { ...},
-- capabilities = {},
settings = { settings = {
Lua = { Lua = {
completion = { completion = {
callSnippet = 'Replace', callSnippet = 'Replace',
}, },
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
-- diagnostics = { disable = { 'missing-fields' } }, diagnostics = { disable = { 'missing-fields' } },
}, },
}, },
}, },
} }
-- Ensure the servers and tools above are installed -- Ensure the servers and tools above are installed
-- To check the current status of installed tools and/or manually install
-- other tools, you can run
-- :Mason
--
-- You can press `g?` for help in this menu.
require('mason').setup() require('mason').setup()
-- You can add other tools here that you want Mason to install -- You can add other tools here that you want Mason to install
-- for you, so that they are available from within Neovim.
local ensure_installed = vim.tbl_keys(servers or {}) local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, { vim.list_extend(ensure_installed, {
'stylua', -- Used to format Lua code 'stylua', -- Used to format Lua code
'eslint_d', 'eslint_d',
'stylelint', 'stylelint',
'clang-format', 'clang-format',
'lua_ls',
'omnisharp', 'omnisharp',
'prettierd', 'prettierd',
}) })
@ -261,8 +250,7 @@ require('lazy').setup({
} }
end, end,
}, },
'nvim-java/nvim-java', -- removing this disables :Mason for some reason... },
{ -- Autoformat { -- Autoformat
'stevearc/conform.nvim', 'stevearc/conform.nvim',
event = { 'BufWritePre' }, event = { 'BufWritePre' },
@ -483,7 +471,7 @@ require('lazy').setup({
main = 'nvim-treesitter.configs', -- Sets main module to use for opts main = 'nvim-treesitter.configs', -- Sets main module to use for opts
-- [[ Configure Treesitter ]] See `:help nvim-treesitter` -- [[ Configure Treesitter ]] See `:help nvim-treesitter`
opts = { opts = {
ensure_installed = { 'bash', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc', 'c' }, ensure_installed = { 'bash', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc', 'c', 'cpp' },
-- Autoinstall languages that are not installed -- Autoinstall languages that are not installed
auto_install = true, auto_install = true,
highlight = { highlight = {