Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 36 additions & 9 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = ' '

-- Set to true if you have a Nerd Font installed and selected in the terminal
vim.g.have_nerd_font = false
vim.g.have_nerd_font = true

-- [[ Setting options ]]
-- See `:help vim.o`
Expand Down Expand Up @@ -166,6 +166,16 @@ vim.o.scrolloff = 10
-- See `:help 'confirm'`
vim.o.confirm = true

-- Configure 'gf' (go to file) for PHP and React development
-- Add common source directories to path for file finding
vim.opt.path:append '**' -- Search recursively in subdirectories
vim.opt.path:append 'src/**' -- Common for both Symfony and React
vim.opt.path:append 'node_modules/**' -- For React/JS imports
vim.opt.path:append 'vendor/**' -- For PHP Composer dependencies

-- Add file extensions that can be omitted when using gf
vim.opt.suffixesadd:prepend { '.php', '.js', '.jsx', '.ts', '.tsx', '.vue' }

-- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()`

Expand Down Expand Up @@ -215,7 +225,10 @@ vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight when yanking (copying) text',
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
callback = function()
vim.hl.on_yank()
vim.highlight.on_yank {
higroup = 'IncSearch',
timeout = 200,
}
end,
})

Expand Down Expand Up @@ -554,6 +567,7 @@ require('lazy').setup({
-- This is where a variable was first declared, or where a function is defined, etc.
-- To jump back, press <C-t>.
map('grd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')

-- WARN: This is not Goto Definition, this is Goto Declaration.
-- For example, in C this would take you to the header.
Expand Down Expand Up @@ -684,6 +698,20 @@ require('lazy').setup({
-- ts_ls = {},
--

-- PHP Language Server (for Symfony development)
intelephense = {
settings = {
intelephense = {
files = {
maxSize = 5000000,
},
},
},
},

-- TypeScript/JavaScript Language Server (for React development)
ts_ls = {},

lua_ls = {
-- cmd = { ... },
-- filetypes = { ... },
Expand Down Expand Up @@ -721,7 +749,6 @@ require('lazy').setup({

require('mason-lspconfig').setup {
ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer)
automatic_installation = false,
handlers = {
function(server_name)
local server = servers[server_name] or {}
Expand Down Expand Up @@ -944,7 +971,7 @@ require('lazy').setup({
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
opts = {
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'query', 'vim', 'vimdoc' },
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {
Expand Down Expand Up @@ -974,17 +1001,17 @@ require('lazy').setup({
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
--
-- require 'kickstart.plugins.debug',
-- require 'kickstart.plugins.indent_line',
require 'kickstart.plugins.indent_line',
-- require 'kickstart.plugins.lint',
-- require 'kickstart.plugins.autopairs',
-- require 'kickstart.plugins.neo-tree',
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
require 'kickstart.plugins.autopairs',
require 'kickstart.plugins.neo-tree',
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps

-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
-- This is the easiest way to modularize your config.
--
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- { import = 'custom.plugins' },
{ import = 'custom.plugins' },
--
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
-- Or use telescope!
Expand Down
26 changes: 26 additions & 0 deletions lua/custom/plugins/dadbod.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
-- Database UI plugin for viewing and interacting with databases
return {
'kristijanhusak/vim-dadbod-ui',
dependencies = {
{ 'tpope/vim-dadbod', lazy = true },
{ 'kristijanhusak/vim-dadbod-completion', ft = { 'sql', 'mysql', 'plsql' }, lazy = true },
},
cmd = {
'DBUI',
'DBUIToggle',
'DBUIAddConnection',
'DBUIFindBuffer',
},
init = function()
-- Use nerd fonts for nice icons
vim.g.db_ui_use_nerd_fonts = 1

-- Save database connections (optional)
-- vim.g.dbs = {
-- dev = 'sqlite:' .. vim.fn.expand('~/path/to/your/database.db'),
-- }
end,
keys = {
{ '<leader>db', '<cmd>DBUIToggle<cr>', desc = 'Toggle Database UI' },
},
}
Loading