aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAriel D'Alessandro <dalessandro.ariel@gmail.com>2023-01-30 09:01:20 +0100
committerAriel D'Alessandro <dalessandro.ariel@gmail.com>2023-01-30 09:01:20 +0100
commit75c20b732ab7a154841871c75f7fb54f016d82dc (patch)
treed7f83e4a614b9f18ae87cfb64aacac0d0180dd07
parent0f1176e2e4d780aa3ed4e8e4e424ffd7a3e168f6 (diff)
downloadnvim-conf-75c20b732ab7a154841871c75f7fb54f016d82dc.tar.gz
nvim-conf-75c20b732ab7a154841871c75f7fb54f016d82dc.zip
feat: update cargo lsp, add todo, update laravel config
-rw-r--r--lazy-lock.json9
-rw-r--r--lua/alpha/lsp/setups.lua120
-rw-r--r--lua/plugins/laravel.lua5
-rw-r--r--lua/plugins/todo-comments.lua23
4 files changed, 95 insertions, 62 deletions
diff --git a/lazy-lock.json b/lazy-lock.json
index 72737ce..ab8dc43 100644
--- a/lazy-lock.json
+++ b/lazy-lock.json
@@ -32,18 +32,18 @@
"null-ls.nvim": { "branch": "main", "commit": "7b2b28e207a1df4ebb13c7dc0bd83f69b5403d71" },
"nvim-autopairs": { "branch": "master", "commit": "31042a5823b55c4bfb30efcbba2fc1b5b53f90dc" },
"nvim-cmp": { "branch": "main", "commit": "e7e2ef7031db8e0cfad7ad9916ec766ddd9dbb3b" },
- "nvim-dap": { "branch": "master", "commit": "d213b7d5bf0d56b1f47c62a2f5d4ebd202fe0d12" },
+ "nvim-dap": { "branch": "master", "commit": "0e376f00e7fac143e29e1017d2ac2cc3df13d185" },
"nvim-dap-go": { "branch": "main", "commit": "6f045a72a05a78e4071dd0880f08214a2bb1461b" },
- "nvim-dap-ui": { "branch": "master", "commit": "e26fba0562cb9c904f7a6510a94961b82701a16f" },
+ "nvim-dap-ui": { "branch": "master", "commit": "395382466f12325919708da238e90add967d0912" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "7f7f2af549e72a0b7bddc3b4f827beb027ea8ce3" },
"nvim-dap-vscode-js": { "branch": "main", "commit": "e7c05495934a658c8aa10afd995dacd796f76091" },
"nvim-lspconfig": { "branch": "master", "commit": "1e988250a0f52a68ddb72905d623405d634e9c5d" },
"nvim-notify": { "branch": "master", "commit": "bdd647f61a05c9b8a57c83b78341a0690e9c29d7" },
"nvim-projectconfig": { "branch": "master", "commit": "05fd34831e170db269d1b84597615bcdcdde930e" },
"nvim-transparent": { "branch": "main", "commit": "6816751e3d595b3209aa475a83b6fbaa3a5ccc98" },
- "nvim-treesitter": { "branch": "master", "commit": "aad763de6ba7d5fbc93377d2d20cae7e374a466b" },
+ "nvim-treesitter": { "branch": "master", "commit": "cda8b291ef6fc4e04036e2ea6cf0de8aa84c2656" },
"nvim-treesitter-refactor": { "branch": "master", "commit": "75f5895cc662d61eb919da8050b7a0124400d589" },
- "nvim-treesitter-textobjects": { "branch": "master", "commit": "71cee2f7b1211fe35918ce5fd0f626c48d9c1e3d" },
+ "nvim-treesitter-textobjects": { "branch": "master", "commit": "9011d333aa411ae71ca8762ca3a277ce6b9e6527" },
"nvim-web-devicons": { "branch": "master", "commit": "a421d183ef37dfa13f51a5805bed2381aebf9080" },
"php-code-actions.nvim": { "branch": "main", "commit": "a85a695c58f9c5e8033d824ffae366e9797e0b28" },
"playground": { "branch": "master", "commit": "c19bcfd6a3681bc876e1b861f6685bfc04972d0d" },
@@ -57,6 +57,7 @@
"telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" },
"telescope.nvim": { "branch": "master", "commit": "dce1156ca103b8222e4abbfc63f9c6887abf5ec6" },
+ "todo-comments.nvim": { "branch": "main", "commit": "74c7d28cb50b0713c881ef69bcb6cdd77d8907d1" },
"tokyonight.nvim": { "branch": "main", "commit": "affb21a81e6d7de073378eb86d02864c594104d9" },
"trouble.nvim": { "branch": "main", "commit": "490f7fe6d227f4f7a64f00be8c7dcd7a508ed271" },
"vim-blade": { "branch": "master", "commit": "9534101808cc320eef003129a40cab04b026a20c" },
diff --git a/lua/alpha/lsp/setups.lua b/lua/alpha/lsp/setups.lua
index 8744e67..15ef064 100644
--- a/lua/alpha/lsp/setups.lua
+++ b/lua/alpha/lsp/setups.lua
@@ -1,66 +1,74 @@
local lsp_attach = require("alpha.lsp.attach")
local lsp_flags = {
- debounce_text_changes = 150,
+ debounce_text_changes = 150,
}
return setmetatable({
- rust_analyzer = function()
- return {
- on_attach = lsp_attach,
- flags = lsp_flags,
- settings = {
- ["rust-analyzer"] = {},
- },
- }
- end,
- phpactor = function()
- return {
- on_attach = lsp_attach,
- flags = lsp_flags,
- filetypes = { "php", "cucumber" },
- }
- end,
- emmet_ls = function()
- local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
+ rust_analyzer = function()
+ return {
+ on_attach = lsp_attach,
+ flags = lsp_flags,
+ settings = {
+ ["rust-analyzer"] = {
+ checkOnSave = {
+ allFeatures = true,
+ overrideCommand = {
+ 'cargo', 'clippy', '--workspace', '--message-format=json',
+ '--all-targets', '--all-features'
+ }
+ }
+ },
+ },
+ }
+ end,
+ phpactor = function()
+ return {
+ on_attach = lsp_attach,
+ flags = lsp_flags,
+ filetypes = { "php", "cucumber" },
+ }
+ end,
+ emmet_ls = function()
+ local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
- return {
- on_attach = lsp_attach,
- flags = lsp_flags,
- capabilities = capabilities,
- filetypes = { "html", "typescriptreact", "javascriptreact", "css", "sass", "scss", "less", "blade", "vue" },
- }
- end,
- sumneko_lua = function()
- return {
- on_attach = lsp_attach,
- flags = lsp_flags,
- settings = {
- Lua = {
- runtime = {
- version = "LuaJIT",
- },
- diagnostics = {
- globals = { "vim" },
- },
- workspace = {
- library = vim.api.nvim_get_runtime_file("", true),
+ return {
+ on_attach = lsp_attach,
+ flags = lsp_flags,
+ capabilities = capabilities,
+ filetypes = { "html", "typescriptreact", "javascriptreact", "css", "sass", "scss", "less", "blade", "vue" },
+ }
+ end,
+ sumneko_lua = function()
+ return {
+ on_attach = lsp_attach,
+ flags = lsp_flags,
+ settings = {
+ Lua = {
+ runtime = {
+ version = "LuaJIT",
+ },
+ diagnostics = {
+ globals = { "vim" },
+ },
+ workspace = {
+ library = vim.api.nvim_get_runtime_file("", true),
checkThirdParty = false,
- },
- telemetry = {
- enable = false,
- },
- },
- },
- }
- end,
+ },
+ telemetry = {
+ enable = false,
+ },
+ },
+ },
+ }
+ end,
}, {
- __index = function()
- return function ()
- return {
- on_attach = lsp_attach,
- flags = lsp_flags,
- }
- end
- end,
+ __index = function()
+ return function()
+ return {
+ on_attach = lsp_attach,
+ flags = lsp_flags,
+ }
+ end
+ end,
})
diff --git a/lua/plugins/laravel.lua b/lua/plugins/laravel.lua
index 60f8ad2..81d276e 100644
--- a/lua/plugins/laravel.lua
+++ b/lua/plugins/laravel.lua
@@ -4,10 +4,11 @@ return {
"rcarriga/nvim-notify",
"nvim-telescope/telescope.nvim",
},
- cmd = {"Sail", "Artisan", "Composer"},
+ cmd = { "Sail", "Artisan", "Composer" },
keys = {
- {"<leader>pa", ":Artisan<cr>"},
+ { "<leader>pa", ":Artisan<cr>" },
},
+ events = { "VeryLazy" },
config = function()
require("laravel").setup()
require("telescope").load_extension("laravel")
diff --git a/lua/plugins/todo-comments.lua b/lua/plugins/todo-comments.lua
new file mode 100644
index 0000000..566b45b
--- /dev/null
+++ b/lua/plugins/todo-comments.lua
@@ -0,0 +1,23 @@
+return {
+ "folke/todo-comments.nvim",
+ dependencies = {
+ "nvim-lua/plenary.nvim",
+ },
+ config = true,
+ lazy = false,
+ cmds = {"TodoTrouble", "TodoTelescope", "TodoQuickFix"},
+ keys = {
+ {
+ "]t",
+ function()
+ require("todo-comments").jump_next()
+ end
+ },
+ {
+ "[t",
+ function()
+ require("todo-comments").jump_prev()
+ end
+ }
+ },
+}