mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 11:24:55 +02:00
Update nvim config
This commit is contained in:
parent
d7a1770460
commit
461e0cc49a
27 changed files with 426 additions and 2999 deletions
40
nvim/lua/plugins/lsp.lua
Normal file
40
nvim/lua/plugins/lsp.lua
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
return {
|
||||
'neovim/nvim-lspconfig',
|
||||
dependencies = {
|
||||
'williamboman/mason.nvim',
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
require('plugins.cmp')
|
||||
},
|
||||
config = function()
|
||||
-- Setup Mason to automatically install LSP servers
|
||||
require('mason').setup()
|
||||
require('mason-lspconfig').setup({ automatic_installation = true })
|
||||
|
||||
-- local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
|
||||
-- PHP
|
||||
require('lspconfig').intelephense.setup({
|
||||
commands = {
|
||||
IntelephenseIndex = {
|
||||
function() vim.lsp.buf.execute_command({ command = 'intelephense.index.workspace' }) end,
|
||||
},
|
||||
},
|
||||
on_attach = function(client, bufnr)
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
client.server_capabilities.documentRangeFormattingProvider = false
|
||||
end,
|
||||
-- capabilities = capabilities
|
||||
})
|
||||
|
||||
-- Tailwind CSS
|
||||
--require('lspconfig').tailwindcss.setup({ capabilities = capabilities })
|
||||
|
||||
|
||||
-- Config
|
||||
-- Sign configuration
|
||||
vim.fn.sign_define('DiagnosticSignError', { text = '', texthl = 'DiagnosticSignError' })
|
||||
vim.fn.sign_define('DiagnosticSignWarn', { text = '', texthl = 'DiagnosticSignWarn' })
|
||||
vim.fn.sign_define('DiagnosticSignInfo', { text = '', texthl = 'DiagnosticSignInfo' })
|
||||
vim.fn.sign_define('DiagnosticSignHint', { text = '', texthl = 'DiagnosticSignHint' })
|
||||
end
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue