adding a few plugins

This commit is contained in:
Miguel Palhas
2024-10-05 08:57:59 +01:00
parent 76da790a27
commit 9d235dea9d
10 changed files with 152 additions and 21 deletions
+17
View File
@@ -0,0 +1,17 @@
local bufnr = vim.api.nvim_get_current_buf()
local opts = { buffer = bufnr }
vim.keymap.set("n", "ga", function()
vim.cmd.RustLsp("codeAction")
end, opts)
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, opts)
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
vim.keymap.set("n", "gd", require("telescope.builtin").lsp_definitions, opts)
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts)
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts)
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
vim.keymap.set("n", "<leader>t", function()
vim.cmd.RustLsp({ "testables" })
end, opts)
+33
View File
@@ -0,0 +1,33 @@
{
"LuaSnip": { "branch": "master", "commit": "e808bee352d1a6fcf902ca1a71cee76e60e24071" },
"NvChad": { "branch": "v2.5", "commit": "b83a949d9e883b6ab98070f224535f1018174a5d" },
"base46": { "branch": "v2.5", "commit": "898a0ed96bf4a20e12fae0b11c9bb771334b066f" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"conform.nvim": { "branch": "master", "commit": "40d4e98fcc3e6f485f0e8924c63734bc7e305967" },
"friendly-snippets": { "branch": "main", "commit": "00ba9dd3df89509f95437b8d595553707c46d5ea" },
"gitsigns.nvim": { "branch": "main", "commit": "863903631e676b33e8be2acb17512fdc1b80b4fb" },
"indent-blankline.nvim": { "branch": "master", "commit": "3af6493bf69e4a857a8b1fab36f333629d413a18" },
"lazy.nvim": { "branch": "main", "commit": "1159bdccd8910a0fd0914b24d6c3d186689023d9" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"menu": { "branch": "main", "commit": "205b3de60bbd1dfa73fd12b04530743cd0e70b22" },
"minty": { "branch": "main", "commit": "8809b2c7c2edbeb3fa9c3b05bd2e89934d54f526" },
"nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" },
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
"nvim-lspconfig": { "branch": "master", "commit": "39f31e178466e4ed23c8ea6fddd5b7a4d9699398" },
"nvim-tree.lua": { "branch": "master", "commit": "c9104a5d079db5a158c9562c54689df27d52dccc" },
"nvim-treesitter": { "branch": "master", "commit": "45386764cc9535200d2288cab929c5093d33660e" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "4a2d05ec24eaa6b655c7d19092a3b6c0219d46b9" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "44fd461b879d80a21d5041f312f070f22551c0bc" },
"nvim-web-devicons": { "branch": "master", "commit": "6b53401918a9033a41159d012160c5fb5eb249ae" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"rustaceanvim": { "branch": "master", "commit": "29f42cc149f915d771c550b6dfe7c788d856cf04" },
"telescope.nvim": { "branch": "master", "commit": "eae0d8fbde590b0eaa2f9481948cd6fd7dd21656" },
"ui": { "branch": "v3.0", "commit": "902cace97a6d1bb6e71274fc867c3e6ff5835ee4" },
"vim-kitty": { "branch": "main", "commit": "9cc594a634308aa3bfaf3da5b5e741da1c0144c1" },
"volt": { "branch": "main", "commit": "ce1e55d52d86e33f340a20b45701b434cc684c15" },
"which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" }
}
+1 -1
View File
@@ -4,7 +4,7 @@ require("nvchad.configs.lspconfig").defaults()
local lspconfig = require "lspconfig"
-- EXAMPLE
local servers = { "html", "cssls" }
local servers = { "html", "cssls", "lua_ls", "biome" }
local nvlsp = require "nvchad.configs.lspconfig"
-- lsps with default config
+10 -1
View File
@@ -7,4 +7,13 @@ local map = vim.keymap.set
map("n", ";", ":", { desc = "CMD enter command mode" })
map("i", "jk", "<ESC>")
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
-- close current buffer
map("n", "<leader>q", ":q<cr>")
-- go back to normal mode
map("i", "jj", "<Esc>")
map("i", "jk", "<Esc>")
--save file
map("n", "<C-s>", ":update<CR>")
map("i", "<C-s>", "<C-o>:update<CR><Esc>")
+12 -1
View File
@@ -2,5 +2,16 @@ require "nvchad.options"
-- add yours here!
-- local o = vim.o
local o = vim.o
-- o.cursorlineopt ='both' -- to enable cursorline!
o.cursorlineopt = 'both'
-- line numbering
o.number = true
o.relativenumber = true
-- search options
o.showmatch = true
o.smartcase = true
o.gdefault = true
+14
View File
@@ -0,0 +1,14 @@
return {
{
"m4xshen/hardtime.nvim",
dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" },
opts = {
restricted_keys = {
["w"] = { "n", "x" },
["W"] = { "n", "x" },
["b"] = { "n", "x" },
["B"] = { "n", "x" },
},
},
},
}
-18
View File
@@ -4,22 +4,4 @@ return {
-- event = 'BufWritePre', -- uncomment for format on save
opts = require "configs.conform",
},
-- These are some examples, uncomment them if you want to see them work!
{
"neovim/nvim-lspconfig",
config = function()
require "configs.lspconfig"
end,
},
-- {
-- "nvim-treesitter/nvim-treesitter",
-- opts = {
-- ensure_installed = {
-- "vim", "lua", "vimdoc",
-- "html", "css"
-- },
-- },
-- },
}
+14
View File
@@ -0,0 +1,14 @@
return {
{
"neovim/nvim-lspconfig",
config = function()
require "configs.lspconfig"
end,
},
{
"mrcjkb/rustaceanvim",
version = "^5", -- Recommended
lazy = false, -- This plugin is already lazy
},
}
+3
View File
@@ -0,0 +1,3 @@
return {
{ "fladson/vim-kitty" },
}
+48
View File
@@ -0,0 +1,48 @@
return {
{
"nvim-treesitter/nvim-treesitter",
dependencies = {
"JoosepAlviste/nvim-ts-context-commentstring",
"nvim-treesitter/nvim-treesitter-textobjects",
},
opts = {
ensure_installed = {
"vim",
"lua",
"vimdoc",
"html",
"css",
"rust",
"regex",
"javascript",
"typescript",
"tsx",
"solidity",
"toml",
"bash",
"markdown",
"markdown_inline",
"json",
"elixir",
"erlang",
"eex",
"kdl",
"yuck",
"sql",
"typst"
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<C-space>",
node_incremental = "<C-space>",
scope_incremental = "<nop>",
node_decremental = "<bs>",
},
},
textobjects = {
select = { enable = true },
},
},
},
}