Skip to content

Commit ff6ed41

Browse files
committed
add dadbod for db viewing
1 parent 3338d39 commit ff6ed41

1 file changed

Lines changed: 36 additions & 9 deletions

File tree

init.lua

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ vim.g.mapleader = ' '
9191
vim.g.maplocalleader = ' '
9292

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

9696
-- [[ Setting options ]]
9797
-- See `:help vim.o`
@@ -166,6 +166,16 @@ vim.o.scrolloff = 10
166166
-- See `:help 'confirm'`
167167
vim.o.confirm = true
168168

169+
-- Configure 'gf' (go to file) for PHP and React development
170+
-- Add common source directories to path for file finding
171+
vim.opt.path:append '**' -- Search recursively in subdirectories
172+
vim.opt.path:append 'src/**' -- Common for both Symfony and React
173+
vim.opt.path:append 'node_modules/**' -- For React/JS imports
174+
vim.opt.path:append 'vendor/**' -- For PHP Composer dependencies
175+
176+
-- Add file extensions that can be omitted when using gf
177+
vim.opt.suffixesadd:prepend { '.php', '.js', '.jsx', '.ts', '.tsx', '.vue' }
178+
169179
-- [[ Basic Keymaps ]]
170180
-- See `:help vim.keymap.set()`
171181

@@ -215,7 +225,10 @@ vim.api.nvim_create_autocmd('TextYankPost', {
215225
desc = 'Highlight when yanking (copying) text',
216226
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
217227
callback = function()
218-
vim.hl.on_yank()
228+
vim.highlight.on_yank {
229+
higroup = 'IncSearch',
230+
timeout = 200,
231+
}
219232
end,
220233
})
221234

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

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

701+
-- PHP Language Server (for Symfony development)
702+
intelephense = {
703+
settings = {
704+
intelephense = {
705+
files = {
706+
maxSize = 5000000,
707+
},
708+
},
709+
},
710+
},
711+
712+
-- TypeScript/JavaScript Language Server (for React development)
713+
ts_ls = {},
714+
687715
lua_ls = {
688716
-- cmd = { ... },
689717
-- filetypes = { ... },
@@ -721,7 +749,6 @@ require('lazy').setup({
721749

722750
require('mason-lspconfig').setup {
723751
ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer)
724-
automatic_installation = false,
725752
handlers = {
726753
function(server_name)
727754
local server = servers[server_name] or {}
@@ -944,7 +971,7 @@ require('lazy').setup({
944971
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
945972
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
946973
opts = {
947-
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
974+
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'query', 'vim', 'vimdoc' },
948975
-- Autoinstall languages that are not installed
949976
auto_install = true,
950977
highlight = {
@@ -974,17 +1001,17 @@ require('lazy').setup({
9741001
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
9751002
--
9761003
-- require 'kickstart.plugins.debug',
977-
-- require 'kickstart.plugins.indent_line',
1004+
require 'kickstart.plugins.indent_line',
9781005
-- require 'kickstart.plugins.lint',
979-
-- require 'kickstart.plugins.autopairs',
980-
-- require 'kickstart.plugins.neo-tree',
981-
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
1006+
require 'kickstart.plugins.autopairs',
1007+
require 'kickstart.plugins.neo-tree',
1008+
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
9821009

9831010
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
9841011
-- This is the easiest way to modularize your config.
9851012
--
9861013
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
987-
-- { import = 'custom.plugins' },
1014+
{ import = 'custom.plugins' },
9881015
--
9891016
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
9901017
-- Or use telescope!

0 commit comments

Comments
 (0)