More updates

lazyvim
Andy Teijelo 2023-06-08 16:38:02 -04:00
parent bd5bf2bfce
commit 6e103f4bff
4 changed files with 24 additions and 4 deletions

View File

@ -13,7 +13,6 @@
"gitsigns.nvim": { "branch": "main", "commit": "4455bb5364d29ff86639dfd5533d4fe4b48192d4" },
"lazy.nvim": { "branch": "main", "commit": "f145e6f42a56306c5536e9efbfe41f7efbec285d" },
"leap.nvim": { "branch": "main", "commit": "14b5a65190fe69388a8f59c695ed3394a10d6af8" },
"lsp_signature.nvim": { "branch": "master", "commit": "17ff7a405fea8376b015b8ea7910d2e59958bf68" },
"lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "5230617372e656d4a2e1e236e03bf7e7b4b97273" },
"mason.nvim": { "branch": "main", "commit": "7d7efc738e08fc5bee822857db45cb6103f0b0c1" },
@ -41,6 +40,7 @@
"todo-comments.nvim": { "branch": "main", "commit": "09b0b17d824d2d56f02ff15967e8a2499a89c731" },
"tokyonight.nvim": { "branch": "main", "commit": "161114bd39b990995e08dbf941f6821afbdcd666" },
"trouble.nvim": { "branch": "main", "commit": "2af0dd9767526410c88c628f1cbfcb6cf22dd683" },
"typescript.nvim": { "branch": "main", "commit": "5b3680e5c386e8778c081173ea0c978c14a40ccb" },
"vim-illuminate": { "branch": "master", "commit": "a2907275a6899c570d16e95b9db5fd921c167502" },
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" },
"vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" },

View File

@ -186,7 +186,8 @@ keymap("i", "<Down>", "<Nop>", opts)
-- prefix = "<leader>"
-- })
-- end
keymap("v", "<leader>lf", "<esc><cmd>'<,'>lua vim.lsp.buf.format{ async = true }<cr>", opts)
keymap("x", "<leader>lf", "<esc><cmd>'<,'>lua vim.lsp.buf.format{ async = true }<cr>", opts)
-- keymap("n", "<leader>lf", "<cmd>lua vim.lsp.buf.format()<cr>", opts)
-- keymap("v", "<leader>lf", "<esc><cmd>'<,'>lua vim.lsp.buf.format{ async = true }<cr>", opts)
-- keymap("x", "<leader>lf", "<esc><cmd>'<,'>lua vim.lsp.buf.format{ async = true }<cr>", opts)
--
-- otherkeymaps()

View File

@ -11,7 +11,9 @@ require("lazy").setup({
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import any extras modules here
-- { import = "lazyvim.plugins.extras.lang.typescript" },
{ import = "lazyvim.plugins.extras.lang.typescript" },
{ import = "lazyvim.plugins.extras.linting.eslint" },
{ import = "lazyvim.plugins.extras.formatting.prettier" },
-- { import = "lazyvim.plugins.extras.lang.json" },
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
-- import/override with your plugins

View File

@ -0,0 +1,17 @@
return {
{
"neovim/nvim-lspconfig",
init = function()
local format = function()
require("lazyvim.plugins.lsp.format").format({ force = true })
end
local keys = require("lazyvim.plugins.lsp.keymaps").get()
keys[#keys + 1] = { "<leader>lf", format, desc = "Format Document", has = "documentFormatting" }
keys[#keys + 1] = { "<leader>lf", format, desc = "Format Range", mode = "v", has = "documentRangeFormatting" }
end,
opts = {
autoformat = false,
},
},
}