Skip to content

Commit 7d66d32

Browse files
author
Mikol Faro
committed
# This is a combination of 2 commits.
# This is the 1st commit message: fix: update lazy uninstall information link (nvim-lua#1148) # The commit message nvim-lua#2 will be skipped: # Add gitignore plugin
1 parent c1ed5c6 commit 7d66d32

File tree

12 files changed

+288
-44
lines changed

12 files changed

+288
-44
lines changed

after/queries/blade/highlights.scm

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
(directive) @function
2+
(directive_start) @function
3+
(directive_end) @function
4+
(comment) @comment
5+
((parameter) @include (#set! "priority" 110))
6+
((php_only) @include (#set! "priority" 110))
7+
((bracket_start) @function (#set! "priority" 120))
8+
((bracket_end) @function (#set! "priority" 120))
9+
(keyword) @function

after/queries/blade/injections.scm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
((text) @injection.content
2+
(#not-has-ancestor? @injection.content "envoy")
3+
(#set! injection.combined)
4+
(#set! injection.language php))

init.lua

Lines changed: 116 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ vim.opt.mouse = 'a'
110110
-- Don't show the mode, since it's already in the status line
111111
vim.opt.showmode = false
112112

113+
-- Expand tabs
114+
vim.opt.expandtab = true
115+
vim.opt.softtabstop = 2
116+
113117
-- Sync clipboard between OS and Neovim.
114118
-- Schedule the setting after `UiEnter` because it can increase startup-time.
115119
-- Remove this option if you want your OS clipboard to remain independent.
@@ -164,14 +168,11 @@ vim.opt.scrolloff = 10
164168
-- See `:help hlsearch`
165169
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
166170

167-
-- Directory path view
168-
vim.keymap.set('n', '<leader>pv', vim.cmd.Ex, { desc = 'Show current [p]ath [v]iew' })
169-
170171
-- Diagnostic keymaps
171172
-- In same window
172173
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
173174
-- Global
174-
vim.keymap.set('n','<C-q>', vim.diagnostic.setqflist, { desc = 'Open global diagnostic [Q]uickfix list' })
175+
-- vim.keymap.set('n','<C-q>', vim.diagnostic.setqflist, { desc = 'Open global diagnostic [Q]uickfix list' })
175176

176177
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
177178
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
@@ -182,10 +183,10 @@ vim.keymap.set('n','<C-q>', vim.diagnostic.setqflist, { desc = 'Open global diag
182183
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
183184

184185
-- TIP: Disable arrow keys in normal mode
185-
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
186-
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
187-
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
188-
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
186+
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
187+
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
188+
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
189+
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
189190

190191
-- Keybinds to make split navigation easier.
191192
-- Use CTRL+<hjkl> to switch between windows
@@ -203,6 +204,15 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
203204
vim.keymap.set('n', '<M-j>', '<cmd>cnext<CR>')
204205
vim.keymap.set('n', '<M-k>', '<cmd>cprev<CR>')
205206

207+
-- Yank buffer absolute path
208+
vim.keymap.set('n', '<leader>yp', function()
209+
vim.fn.setreg('+', vim.fn.expand('%'))
210+
end, { desc = 'Yank relative path of current buffer' })
211+
212+
vim.keymap.set('n', '<leader>yP', function()
213+
vim.fn.setreg('+', vim.fn.expand('%:p'))
214+
end, { desc = 'Yank absolute path to buffer' })
215+
206216
-- [[ Basic Autocommands ]]
207217
-- See `:help lua-guide-autocommands`
208218

@@ -242,9 +252,9 @@ vim.opt.rtp:prepend(lazypath)
242252
-- NOTE: Here is where you install your plugins.
243253
require('lazy').setup({
244254
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
245-
-- { -- Detect tabstop and shiftwidth automatically
246-
-- 'tpope/vim-sleuth',
247-
-- },
255+
{ -- Detect tabstop and shiftwidth automatically
256+
'tpope/vim-sleuth',
257+
},
248258

249259
-- NOTE: Plugins can also be added by using a table,
250260
-- with the first argument being the link and the following
@@ -419,6 +429,13 @@ require('lazy').setup({
419429
vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
420430
vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
421431
vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' })
432+
vim.keymap.set('n', '<leader>sF', function ()
433+
builtin.find_files({
434+
hidden = true,
435+
no_ignore = true,
436+
no_ignore_parent = true,
437+
})
438+
end, { desc = '[S]earch [F]iles, include ignored files' })
422439
vim.keymap.set('n', '<leader>ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' })
423440
vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
424441
vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' })
@@ -631,7 +648,7 @@ require('lazy').setup({
631648
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
632649
local servers = {
633650
-- clangd = {},
634-
-- gopls = {},
651+
gopls = {},
635652
-- pyright = {},
636653
-- rust_analyzer = {},
637654
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
@@ -643,6 +660,10 @@ require('lazy').setup({
643660
-- ts_ls = {},
644661
--
645662

663+
-- golangci_lint_ls = {
664+
-- cmd = vim.fn.expand(os.getenv("HOME") .. "/go/bin/golangci-lint-langserver"),
665+
-- },
666+
646667
lua_ls = {
647668
-- cmd = {...},
648669
-- filetypes = { ...},
@@ -657,6 +678,67 @@ require('lazy').setup({
657678
},
658679
},
659680
},
681+
682+
phpactor = {
683+
cmd = { "phpactor", "language-server" },
684+
},
685+
686+
rust_analyzer = {
687+
-- rustup component add rust-analyzer
688+
},
689+
690+
tailwindcss = {
691+
-- npm install -g @tailwindcss/language-server
692+
tailwindCSS = {
693+
classAttributes = { "class", "className", "class:list", "classList", "ngClass" },
694+
includeLanguages = {
695+
eelixir = "html-eex",
696+
eruby = "erb",
697+
htmlangular = "html",
698+
templ = "html",
699+
volar = "vue",
700+
},
701+
lint = {
702+
cssConflict = "warning",
703+
invalidApply = "error",
704+
invalidConfigPath = "error",
705+
invalidScreen = "error",
706+
invalidTailwindDirective = "error",
707+
invalidVariant = "error",
708+
recommendedVariantOrder = "warning"
709+
},
710+
validate = true
711+
}
712+
},
713+
714+
ts_ls = {
715+
init_options = {
716+
plugins = {
717+
{
718+
name = "@vue/typescript-plugin",
719+
-- npm install -g @vue/typescript-plugin typescript-language-server typescript
720+
location = vim.fn.expand(os.getenv("NVM_BIN") .. "/../lib/node_modules/@vue/typescript-plugin"),
721+
languages = {"javascript", "typescript", "vue"},
722+
},
723+
},
724+
},
725+
filetypes = {
726+
"javascript",
727+
"typescript",
728+
"vue",
729+
},
730+
},
731+
732+
volar = {
733+
-- npm install -g @vue/language-server
734+
filetypes = {'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue', 'json'},
735+
init_options = {
736+
typescript = {
737+
tsdk = vim.fn.expand(os.getenv("NVM_BIN") .. "/../lib/node_modules/typescript/lib")
738+
}
739+
}
740+
}
741+
660742
}
661743

662744
-- Ensure the servers and tools above are installed
@@ -921,7 +1003,7 @@ require('lazy').setup({
9211003
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
9221004
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
9231005
opts = {
924-
ensure_installed = {
1006+
ensure_installed = {
9251007
'bash', 'c', 'css', 'diff', 'html', 'javascript', 'lua', 'luadoc',
9261008
'markdown', 'markdown_inline', 'query', 'scss', 'typescript', 'vim',
9271009
'vimdoc', 'vue'
@@ -943,6 +1025,26 @@ require('lazy').setup({
9431025
-- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
9441026
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
9451027
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
1028+
config = function(plug, config)
1029+
-- https://github.com/EmranMR/tree-sitter-blade/discussions/19
1030+
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
1031+
parser_config.blade = {
1032+
install_info = {
1033+
url = "https://github.com/EmranMR/tree-sitter-blade",
1034+
files = {"src/parser.c"},
1035+
branch = "main",
1036+
},
1037+
filetype = "blade"
1038+
}
1039+
1040+
vim.filetype.add({
1041+
pattern = {
1042+
['.*%.blade%.php'] = 'blade',
1043+
}
1044+
})
1045+
1046+
require(plug.main).setup(config);
1047+
end,
9461048
},
9471049

9481050
-- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the
@@ -959,7 +1061,7 @@ require('lazy').setup({
9591061
-- require 'kickstart.plugins.lint',
9601062
-- require 'kickstart.plugins.autopairs',
9611063
-- require 'kickstart.plugins.neo-tree',
962-
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
1064+
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
9631065

9641066
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
9651067
-- This is the easiest way to modularize your config.
@@ -993,8 +1095,5 @@ require('lazy').setup({
9931095
},
9941096
})
9951097

996-
vim.o.expandtab = true
997-
vim.o.shiftwidth = 4
998-
9991098
-- The line beneath this is called `modeline`. See `:help modeline`
10001099
-- vim: ts=2 sts=2 sw=2 et

lazy-lock.json

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,42 @@
11
{
2-
"LuaSnip": { "branch": "master", "commit": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d" },
2+
"LuaSnip": { "branch": "master", "commit": "66b5c2707e624dcd2cd3605676c64a2efe47e9d1" },
33
"auto-save.nvim": { "branch": "main", "commit": "979b6c82f60cfa80f4cf437d77446d0ded0addf0" },
4-
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
5-
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
4+
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
5+
"cmp-path": { "branch": "main", "commit": "e52e640b7befd8113b3350f46e8cfcfe98fcf730" },
66
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
77
"darcula": { "branch": "master", "commit": "faf8dbab27bee0f27e4f1c3ca7e9695af9b1242b" },
88
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
9-
"fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" },
10-
"gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" },
11-
"lazy.nvim": { "branch": "main", "commit": "014d1d6d78df4e58f962158e6e00261d8632612c" },
12-
"lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" },
13-
"luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" },
14-
"mason-lspconfig.nvim": { "branch": "main", "commit": "8e46de9241d3997927af12196bd8faa0ed08c29a" },
15-
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
16-
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
17-
"mini.nvim": { "branch": "main", "commit": "73bbcbfa7839c4b00a64965fb504f87461abefbd" },
18-
"nvim-cmp": { "branch": "main", "commit": "ca4d3330d386e76967e53b85953c170658255ecb" },
19-
"nvim-lspconfig": { "branch": "master", "commit": "47f236c058f0511702286a21ba53bbf42abbd8a8" },
20-
"nvim-treesitter": { "branch": "master", "commit": "3b8dee4293567b0b9a87360842af14669f60dd13" },
21-
"nvim-web-devicons": { "branch": "master", "commit": "87c34abe5d1dc7c1c0a95aaaf888059c614c68ac" },
22-
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
23-
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
9+
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
10+
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
11+
"gitignore.nvim": { "branch": "master", "commit": "0344f643768c4d64af4add8c1bdddf6f7d4c9010" },
12+
"gitsigns.nvim": { "branch": "main", "commit": "0cb5a7753d3c4b8e9cfdc9d88d9110cb8d4b1544" },
13+
"jupynium.nvim": { "branch": "master", "commit": "144ab6e46d2b42264c16a4f3c780d88feb0a89e8" },
14+
"kanagawa.nvim": { "branch": "master", "commit": "debe91547d7fb1eef34ce26a5106f277fbfdd109" },
15+
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
16+
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
17+
"luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" },
18+
"mason-lspconfig.nvim": { "branch": "main", "commit": "bc743e4f3dc4b6d22b0a9e0b68a6664d93f8a694" },
19+
"mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
20+
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
21+
"mini.nvim": { "branch": "main", "commit": "ec0fc48de7408f1fc09b1ee2a87484396032dbb4" },
22+
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
23+
"nvim-lspconfig": { "branch": "master", "commit": "dbfd8da6206b4ab0e2fe9b72a538f82e2b410102" },
24+
"nvim-notify": { "branch": "master", "commit": "a22f5d7ac511c2df2fd3290a9f04c48d5a822e2e" },
25+
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
26+
"nvim-web-devicons": { "branch": "master", "commit": "0422a19d9aa3aad2c7e5cca167e5407b13407a9d" },
27+
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
28+
"rest.nvim": { "branch": "main", "commit": "de9726ab956e30202aafbcdea83c1d6bffe54227" },
29+
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
2430
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
2531
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
26-
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
27-
"tokyonight.nvim": { "branch": "main", "commit": "355e2842291dbf51b2c5878e9e37281bbef09783" },
28-
"typescript-tools.nvim": { "branch": "master", "commit": "35e397ce467bedbbbb5bfcd0aa79727b59a08d4a" },
29-
"vim-fugitive": { "branch": "master", "commit": "320b18fba2a4f2fe3c8225c778c687e0d2620384" },
30-
"which-key.nvim": { "branch": "main", "commit": "9b365a6428a9633e3eeb34dbef1b791511c54f70" }
32+
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
33+
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
34+
"typescript-tools.nvim": { "branch": "master", "commit": "3c501d7c7f79457932a8750a2a1476a004c5c1a9" },
35+
"vim-dadbod": { "branch": "master", "commit": "e95afed23712f969f83b4857a24cf9d59114c2e6" },
36+
"vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" },
37+
"vim-dadbod-ui": { "branch": "master", "commit": "2900a1617b3df1a48683d872eadbe1101146a49a" },
38+
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
39+
"vim-qf": { "branch": "master", "commit": "7cafff6a9e0a1b54364b26a87f1efe749f8fb96b" },
40+
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
41+
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
3142
}

lua/custom/plugins/copilot.lua.bak

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
return {
2+
{
3+
"zbirenbaum/copilot.lua",
4+
cmd = "Copilot",
5+
event = "InsertEnter",
6+
config = function()
7+
require("copilot").setup({})
8+
end,
9+
},
10+
{
11+
"zbirenbaum/copilot-cmp",
12+
config = function ()
13+
require("copilot_cmp").setup()
14+
end
15+
}
16+
}

lua/custom/plugins/dadbod.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ return {
1414
init = function()
1515
-- Your DBUI configuration
1616
vim.g.db_ui_use_nerd_fonts = 1
17+
18+
-- Prevent code folding in result buffer
19+
vim.api.nvim_create_autocmd("FileType", {
20+
pattern = "dbout",
21+
callback = function ()
22+
vim.opt_local.foldenable = false
23+
end
24+
})
1725
end,
1826
}
1927
}

lua/custom/plugins/gitignore.lua

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
return {
2+
{ -- Git iggnore generator
3+
"wintermute-cell/gitignore.nvim",
4+
dependencies = {
5+
{ "nvim-telescope/telescope.nvim" },
6+
},
7+
config = function()
8+
require('gitignore')
9+
end,
10+
cmd = "Gitignore",
11+
lazy = true
12+
}
13+
}

0 commit comments

Comments
 (0)