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
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ External Requirements:
- If you want to write Typescript, you need `npm`
- If you want to write Golang, you will need `go`
- etc.
- Typescipt Setup
- run `npm i -g typescript typescript-language-server`
- [Laravel Setup](https://seankegel.com/neovim-for-php-and-laravel)

> [!NOTE]
> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes
Expand Down Expand Up @@ -75,7 +78,7 @@ too - it's ignored in the kickstart repo to make maintenance easier, but it's
<details><summary> Linux and Mac </summary>

```sh
git clone https://github.com/dam9000/kickstart-modular.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
git clone https://github.com/luan441/config.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
```

</details>
Expand All @@ -85,13 +88,13 @@ git clone https://github.com/dam9000/kickstart-modular.nvim.git "${XDG_CONFIG_HO
If you're using `cmd.exe`:

```
git clone https://github.com/dam9000/kickstart.nvim.git "%localappdata%\nvim"
git clone https://github.com/luan441/config.nvim.git "%localappdata%\nvim"
```

If you're using `powershell.exe`

```
git clone https://github.com/dam9000/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim"
git clone https://github.com/luan441/config.nvim.git "${env:LOCALAPPDATA}\nvim"
```

</details>
Expand Down Expand Up @@ -146,7 +149,7 @@ examples of adding popularly requested plugins.
As you progress in learning Neovim and Lua, you might consider splitting `init.lua`
into smaller parts. A fork of kickstart that does this while maintaining the
same functionality is available here:
* [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim)
* [kickstart-modular.nvim](https://github.com/luan441/config-modular.nvim)
* *NOTE: This is the fork that splits the configuration into smaller parts.*
The original repo with the single `init.lua` file is available here:
* [kickstart.nvim](https://github.com/nvim-lua/kickstart.nvim)
Expand Down
9 changes: 9 additions & 0 deletions after/queries/blade/folds.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
((directive_start) @start
(directive_end) @end.after
(#set! role block))


((bracket_start) @start
(bracket_end) @end
(#set! role block))

9 changes: 9 additions & 0 deletions after/queries/blade/highlight.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(directive) @function
(directive_start) @function
(directive_end) @function
(comment) @comment
((parameter) @include (#set! "priority" 110))
((php_only) @include (#set! "priority" 110))
((bracket_start) @function (#set! "priority" 120))
((bracket_end) @function (#set! "priority" 120))
(keyword) @function
5 changes: 5 additions & 0 deletions after/queries/blade/highlights.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(directive) @tag
(directive_start) @tag
(directive_end) @tag
(comment) @comment

24 changes: 24 additions & 0 deletions after/queries/blade/injections.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
((text) @injection.content
(#not-has-ancestor? @injection.content "envoy")
(#set! injection.combined)
(#set! injection.language php))

; tree-sitter-comment injection
; if available
((comment) @injection.content
(#set! injection.language "comment"))

; could be bash or zsh
; or whatever tree-sitter grammar you have.
((text) @injection.content
(#has-ancestor? @injection.content "envoy")
(#set! injection.combined)
(#set! injection.language bash))

((php_only) @injection.content
(#set! injection.language php_only))

((parameter) @injection.content
(#set! injection.include-children) ; You may need this, depending on your editor e.g Helix
(#set! injection.language "php-only"))

2 changes: 1 addition & 1 deletion 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 ]]
require 'options'
Expand Down
9 changes: 9 additions & 0 deletions lua/custom/plugins/flutter.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
return {
'nvim-flutter/flutter-tools.nvim',
lazy = false,
dependencies = {
'nvim-lua/plenary.nvim',
'stevearc/dressing.nvim', -- optional for vim.ui.select
},
config = true,
}
20 changes: 20 additions & 0 deletions lua/custom/plugins/go.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
return {
'ray-x/go.nvim',
dependencies = { -- optional packages
'ray-x/guihua.lua',
'neovim/nvim-lspconfig',
'nvim-treesitter/nvim-treesitter',
},
config = function()
local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities())
require('go').setup {
lsp_cfg = {
capabilities = capabilities,
},
luasnip = true,
}
end,
event = { 'CmdlineEnter' },
ft = { 'go', 'gomod' },
build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries
}
14 changes: 14 additions & 0 deletions lua/custom/plugins/gruvbox-material.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
return {
{
'sainnhe/gruvbox-material',
lazy = false,
priority = 1000,
config = function()
vim.g.gruvbox_material_enable_italic = true
vim.g.gruvbox_material_background = 'hard'

vim.cmd.colorscheme 'gruvbox-material'
end,
},
}
-- vim: ts=2 sts=2 sw=2 et
18 changes: 18 additions & 0 deletions lua/custom/plugins/oil.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
return {
'stevearc/oil.nvim',
---@module 'oil'
dependencies = {
{ 'echasnovski/mini.icons', opts = {} },
{ 'nvim-tree/nvim-web-devicons' },
},
-- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.
lazy = false,
config = function()
require('oil').setup {
view_options = {
show_hidden = true,
},
}
vim.keymap.set('n', '<leader>o', '<CMD>Oil<CR>', { desc = 'Open parent directory' })
end,
}
45 changes: 45 additions & 0 deletions lua/custom/plugins/php.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
return {
{
'ta-tikoma/php.easy.nvim',
config = true,
keys = {
{ '-#', '<CMD>PHPEasyAttribute<CR>', ft = 'php', desc = 'Attribute' },
{ '-b', '<CMD>PHPEasyDocBlock<CR>', ft = 'php', desc = 'Doc Block' },
{ '-r', '<CMD>PHPEasyReplica<CR>', ft = 'php', desc = 'Replica' },
{ '-c', '<CMD>PHPEasyCopy<CR>', ft = 'php', desc = 'Copy' },
{ '-d', '<CMD>PHPEasyDelete<CR>', ft = 'php', desc = 'Delete' },
{ '-uu', '<CMD>PHPEasyRemoveUnusedUses<CR>', ft = 'php', desc = 'Remove Unused Uses' },
{ '-e', '<CMD>PHPEasyExtends<CR>', ft = 'php', desc = 'Extends' },
{ '-i', '<CMD>PHPEasyImplements<CR>', ft = 'php', desc = 'Implements' },
{ '--i', '<CMD>PHPEasyInitInterface<CR>', ft = 'php', desc = 'Init Interface' },
{ '--c', '<CMD>PHPEasyInitClass<CR>', ft = 'php', desc = 'Init Class' },
{ '--ac', '<CMD>PHPEasyInitAbstractClass<CR>', ft = 'php', desc = 'Init Abstract Class' },
{ '--t', '<CMD>PHPEasyInitTrait<CR>', ft = 'php', desc = 'Init Trait' },
{ '--e', '<CMD>PHPEasyInitEnum<CR>', ft = 'php', desc = 'Init Enum' },
{ '-c', '<CMD>PHPEasyAppendConstant<CR>', ft = 'php', mode = { 'n', 'v' }, desc = 'Append Constant' },
{ '-p', '<CMD>PHPEasyAppendProperty<CR>', ft = 'php', mode = { 'n', 'v' }, desc = 'Append Property' },
{ '-m', '<CMD>PHPEasyAppendMethod<CR>', ft = 'php', mode = { 'n', 'v' }, desc = 'Append Method' },
{ '__', '<CMD>PHPEasyAppendConstruct<CR>', ft = 'php', desc = 'Append Construct' },
{ '_i', '<CMD>PHPEasyAppendInvoke<CR>', ft = 'php', desc = 'Append Invoke' },
{ '-a', '<CMD>PHPEasyAppendArgument<CR>', ft = 'php', desc = 'Append Argument' },
},
},
{
'adalessa/laravel.nvim',
dependencies = {
'tpope/vim-dotenv',
'nvim-telescope/telescope.nvim',
'MunifTanjim/nui.nvim',
'kevinhwang91/promise-async',
},
cmd = { 'Laravel' },
keys = {
{ '<leader>la', ':Laravel artisan<cr>' },
{ '<leader>lr', ':Laravel routes<cr>' },
{ '<leader>lm', ':Laravel related<cr>' },
},
event = { 'VeryLazy' },
opts = {},
config = true,
},
}
5 changes: 5 additions & 0 deletions lua/custom/plugins/typescript.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
return {
'pmizio/typescript-tools.nvim',
dependencies = { 'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig' },
opts = {},
}
6 changes: 3 additions & 3 deletions lua/kickstart/plugins/cmp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ return {

-- If you prefer more traditional completion keymaps,
-- you can uncomment the following lines
--['<CR>'] = cmp.mapping.confirm { select = true },
--['<Tab>'] = cmp.mapping.select_next_item(),
--['<S-Tab>'] = cmp.mapping.select_prev_item(),
['<CR>'] = cmp.mapping.confirm { select = true },
['<Tab>'] = cmp.mapping.select_next_item(),
['<S-Tab>'] = cmp.mapping.select_prev_item(),

-- Manually trigger a completion from nvim-cmp.
-- Generally you don't need this, because nvim-cmp will display
Expand Down
13 changes: 12 additions & 1 deletion lua/kickstart/plugins/conform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,18 @@ return {
-- python = { "isort", "black" },
--
-- You can use 'stop_after_first' to run the first available formatter from the list
-- javascript = { "prettierd", "prettier", stop_after_first = true },
javascript = { 'prettierd', 'prettier', stop_after_first = true },
typescript = { 'prettierd', 'prettier', stop_after_first = true },
javascriptreact = { 'prettierd', 'prettier', stop_after_first = true },
typescriptreact = { 'prettierd', 'prettier', stop_after_first = true },
php = { 'php-cs-fixer' },
twig = { 'twig-cs-fixer' },
blade = { 'blade-formatter' },
json = { 'prettierd', 'prettier' },
yaml = { 'prettierd', 'prettier' },
cpp = { 'clang-format' },
python = { 'ruff' },
sql = { 'sqlfmt' },
},
},
},
Expand Down
10 changes: 10 additions & 0 deletions lua/kickstart/plugins/lint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ return {
local lint = require 'lint'
lint.linters_by_ft = {
markdown = { 'markdownlint' },
javascript = { 'eslint_d' },
typescript = { 'eslint_d' },
javascriptreact = { 'eslint_d' },
typescriptreact = { 'eslint_d' },
php = { 'phpstan' },
json = { 'jsonlint' },
yaml = { 'yamllint' },
cpp = { 'ccplint' },
python = { 'ruff' },
sql = { 'sqlfluff' },
}

-- To allow other plugins to add linters to require('lint').linters_by_ft,
Expand Down
22 changes: 22 additions & 0 deletions lua/kickstart/plugins/lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,15 @@ return {
},
},
},
eslint = {},
phpactor = {},
twiggy_language_server = {},
dockerls = {},
docker_compose_language_service = {},
rust_analyzer = {},
clangd = {},
ruff = {},
sqls = {},
}

-- Ensure the servers and tools above are installed
Expand All @@ -254,6 +263,19 @@ return {
local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {
'stylua', -- Used to format Lua code
'markdownlint',
'prettier',
'prettierd',
'eslint_d',
'phpstan',
'php-cs-fixer',
'twig-cs-fixer',
'jsonlint',
'yamllint',
'cpplint',
'clang-format',
'sqlfmt',
'sqlfluff',
})
require('mason-tool-installer').setup { ensure_installed = ensure_installed }

Expand Down
60 changes: 42 additions & 18 deletions lua/kickstart/plugins/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,49 @@ return {
build = ':TSUpdate',
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' },
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {
opts = function(_, opts)
local parser_config = require('nvim-treesitter.parsers').get_parser_configs()

parser_config.blade = {
install_info = {
url = 'https://github.com/EmranMR/tree-sitter-blade',
files = { 'src/parser.c' },
branch = 'main',
},
filetype = 'blade',
}

opts.ensure_installed = {
'bash',
'c',
'diff',
'html',
'lua',
'luadoc',
'markdown',
'markdown_inline',
'query',
'vim',
'vimdoc',
'go',
'gomod',
'gosum',
'php',
'phpdoc',
'twig',
'json',
'dart',
'blade',
'cpp',
'rust',
'python',
'sql',
}
opts.highlight = {
enable = true,
-- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
-- If you are experiencing weird indenting issues, add the language to
-- the list of additional_vim_regex_highlighting and disabled languages for indent.
additional_vim_regex_highlighting = { 'ruby' },
},
indent = { enable = true, disable = { 'ruby' } },
},
-- There are additional nvim-treesitter modules that you can use to interact
-- with nvim-treesitter. You should go explore a few and see what interests you:
--
-- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
}
opts.indent = { enable = true }
end,
},
}
-- vim: ts=2 sts=2 sw=2 et
Loading