From 1a8e43f94999d5855c7fa5ea19c85ba37dbfdca5 Mon Sep 17 00:00:00 2001 From: Belal Elsabbagh Date: Fri, 14 Nov 2025 14:11:43 +0200 Subject: [PATCH] fixes --- .config/nvim/init.lua | 11 +-------- .config/nvim/lua/plugins/formatter.lua | 6 +---- .config/nvim/lua/plugins/lazydev.lua | 31 ++++++++++++++++++++++++++ .editorconfig | 4 ++++ 4 files changed, 37 insertions(+), 15 deletions(-) create mode 100644 .config/nvim/lua/plugins/lazydev.lua create mode 100644 .editorconfig diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 4cf2e36..e8724f1 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -96,16 +96,6 @@ vim.api.nvim_create_autocmd('LspAttach', { vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc }) end - map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') - map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences') - map('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation') - map('D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition') - map('ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols') - map('ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols') - map('rn', vim.lsp.buf.rename, '[R]e[n]ame') - map('ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' }) - map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') - local client = vim.lsp.get_client_by_id(event.data.client_id) if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false }) @@ -151,4 +141,5 @@ vim.lsp.enable { 'tsls', 'yamlls', 'astrols', + 'bashls', } diff --git a/.config/nvim/lua/plugins/formatter.lua b/.config/nvim/lua/plugins/formatter.lua index 3b6d4f4..ab23e94 100644 --- a/.config/nvim/lua/plugins/formatter.lua +++ b/.config/nvim/lua/plugins/formatter.lua @@ -32,7 +32,7 @@ return { json = { 'biome', 'prettier', stop_after_first = true }, vue = { 'biome', 'prettier' }, svelte = { 'biome', 'prettier', stop_after_first = true }, - php = { 'pint', 'intelephense', stop_after_first = true }, + php = { 'pint', stop_after_first = true }, }, formatters = { biome = { @@ -71,10 +71,6 @@ return { end, stdin = true, }, - intelephense = { - command = 'intelephense', - args = {}, - }, }, }, } diff --git a/.config/nvim/lua/plugins/lazydev.lua b/.config/nvim/lua/plugins/lazydev.lua new file mode 100644 index 0000000..3ae4e3a --- /dev/null +++ b/.config/nvim/lua/plugins/lazydev.lua @@ -0,0 +1,31 @@ +return { + { + 'folke/lazydev.nvim', + ft = 'lua', -- only load on lua files + opts = { + library = { + -- See the configuration section for more details + -- Load luvit types when the `vim.uv` word is found + { path = '${3rd}/luv/library', words = { 'vim%.uv' } }, + }, + }, + }, + { -- optional blink completion source for require statements and module annotations + 'saghen/blink.cmp', + opts = { + sources = { + -- add lazydev to your completion providers + default = { 'lazydev', 'lsp', 'path', 'snippets', 'buffer' }, + providers = { + lazydev = { + name = 'LazyDev', + module = 'lazydev.integrations.blink', + -- make lazydev completions top priority (see `:h blink.cmp`) + score_offset = 100, + }, + }, + }, + }, + }, + -- { "folke/neodev.nvim", enabled = false }, -- make sure to uninstall or disable neodev.nvim +} diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..9cf6a80 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,4 @@ +root = true + +[*] +max_line_length = 120