From 4824c7964fcb541d609c496773011b203e1ea825 Mon Sep 17 00:00:00 2001 From: FredzyW Date: Fri, 15 Nov 2024 10:54:06 +0100 Subject: [PATCH] Updated some stuff --- init.lua | 1 + lazy-lock.json | 56 ++++++++++++++++---------------------- lua/keybindings/keymap.lua | 4 +++ lua/plugin/formatter.lua | 1 + lua/plugin/lsp_config.lua | 3 ++ lua/plugins.lua | 3 ++ 6 files changed, 36 insertions(+), 32 deletions(-) create mode 100644 lua/plugin/formatter.lua diff --git a/init.lua b/init.lua index 3487608..f587dbe 100644 --- a/init.lua +++ b/init.lua @@ -27,6 +27,7 @@ require 'plugin.treesitter' require 'plugin.cmp' require 'plugin.auto_session' require 'plugin.lualine' +require 'plugin.formatter' vim.o.termguicolors = true vim.cmd('colorscheme catppuccin-mocha') diff --git a/lazy-lock.json b/lazy-lock.json index 8da805d..1cb7619 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,41 +1,33 @@ { - "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, - "LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" }, + "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, + "LuaSnip": { "branch": "master", "commit": "a7a4b4682c4b3e2ba82b82a4e6e5f5a0e79dec32" }, "LuaSnip-snippets.nvim": { "branch": "main", "commit": "d7e40e4cce622eab2316607dbcd8d6039bcb9fe0" }, - "auto-session": { "branch": "main", "commit": "af2219b9fa99c1d7ac409bd9eac094c459d3f52d" }, - "base16-nvim": { "branch": "master", "commit": "b3e9ec6a82c05b562cd71f40fe8964438a9ba64a" }, - "catppuccin": { "branch": "main", "commit": "aebe43db9cb26e1c70fc5b2fd4158169c405e720" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, + "auto-session": { "branch": "main", "commit": "d5553e7e0fc83a7296847ef8009b9b93a4191cdb" }, + "catppuccin": { "branch": "main", "commit": "10eda02ea4faa7d1f94e77a3410a4ae91c25c5f5" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "dracula.nvim": { "branch": "main", "commit": "8d8bddb8814c3e7e62d80dda65a9876f97eb699c" }, - "friendly-snippets": { "branch": "main", "commit": "ea068f1becd91bcd4591fceb6420d4335e2e14d3" }, - "fzf": { "branch": "master", "commit": "c30e486b648c1540a660802a5015aeca208274fa" }, + "formatter.nvim": { "branch": "master", "commit": "eb89a1f3e079f1b9680bc7293b75fffccb5e1598" }, + "friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" }, + "fzf": { "branch": "master", "commit": "9b27d68a3749ea383f4b053a92a14d6712a40ef7" }, "fzf-lsp.nvim": { "branch": "main", "commit": "16905056051759b15a388709a3fa65ff098eb243" }, - "gitsigns.nvim": { "branch": "main", "commit": "75dc649106827183547d3bedd4602442340d2f7f" }, "indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" }, - "lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" }, - "lazygit.nvim": { "branch": "main", "commit": "0ada6c6e7e138df92f5009b6952f4ac41248305a" }, - "leap.nvim": { "branch": "main", "commit": "68ca052dfdcda5e4e958d1ba0fef35e94a3e02e8" }, - "lsp-zero.nvim": { "branch": "v3.x", "commit": "8d96bcd4450a83a528a013ec5bf7dafa5f3d36c4" }, - "lualine.nvim": { "branch": "master", "commit": "b5e8bb642138f787a2c1c5aedc2a78cb2cebbd67" }, - "neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" }, - "nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" }, - "nvim-cmp": { "branch": "main", "commit": "b9fd19fa160490609389cd45d552896ec4264a6d" }, - "nvim-dap": { "branch": "master", "commit": "405df1dcc2e395ab5173a9c3d00e03942c023074" }, - "nvim-lspconfig": { "branch": "master", "commit": "f4619ab31fc4676001ea05ae8200846e6e7700c7" }, + "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, + "lazygit.nvim": { "branch": "main", "commit": "dc56df433bfbf107fee0139e187eb9750878fa84" }, + "leap.nvim": { "branch": "main", "commit": "3b1d76ee9cd5a12a8f7a42f0e91124332860205c" }, + "lsp-zero.nvim": { "branch": "v3.x", "commit": "56db3d5ce5476b183783160e6045f7337ba12b83" }, + "lualine.nvim": { "branch": "master", "commit": "544dd1583f9bb27b393f598475c89809c4d5e86b" }, + "nvim-autopairs": { "branch": "master", "commit": "e38c5d837e755ce186ae51d2c48e1b387c4425c6" }, + "nvim-cmp": { "branch": "main", "commit": "d818fd0624205b34e14888358037fb6f5dc51234" }, + "nvim-lspconfig": { "branch": "master", "commit": "f95d371c1a274f60392edfd8ea5121b42dca736e" }, "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" }, - "nvim-treesitter": { "branch": "master", "commit": "ff797254282b56d98849f6fa1082f3b2f99ebe43" }, - "nvim-web-devicons": { "branch": "master", "commit": "3ee60deaa539360518eaab93a6c701fe9f4d82ef" }, - "obsidian.nvim": { "branch": "main", "commit": "14e0427bef6c55da0d63f9a313fd9941be3a2479" }, - "octo.nvim": { "branch": "master", "commit": "5646539320cd62af6ff28f48ec92aeb724c68e18" }, - "plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" }, - "ripgrep": { "branch": "master", "commit": "3ad0e83471588d8802d5747d0cc9accec76f7ccf" }, + "nvim-treesitter": { "branch": "master", "commit": "2b4881286ad73c9ece7e5e4da130b2e4726c09fc" }, + "nvim-web-devicons": { "branch": "master", "commit": "a2af6aa13a2ad3ad361d562a319a91bcd68c43a4" }, + "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, + "ripgrep": { "branch": "master", "commit": "71d71d2d98964653cdfcfa315802f518664759d7" }, "rnvimr": { "branch": "main", "commit": "3c41af742a61caf74a9f83fb82b9ed03ef13b880" }, "snap": { "branch": "main", "commit": "c0bcae835facb945c25073d233c15dbfeb7adc5e" }, - "substitute.nvim": { "branch": "main", "commit": "17ffaeb5a1dc2dbef39cf0865d8a4b6000836714" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, + "substitute.nvim": { "branch": "main", "commit": "97f49d16f8eea7967d41db4f657dd63af53eeba1" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" }, - "vimtex": { "branch": "master", "commit": "5ac62e0315c6f54f53a7d6da7c485cf8e9cf7240" }, - "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }, - "yanky.nvim": { "branch": "main", "commit": "79338563e85a868e59cda02c51b54d90a5514a12" } -} \ No newline at end of file + "vimtex": { "branch": "master", "commit": "5ac62e0315c6f54f53a7d6da7c485cf8e9cf7240" } +} diff --git a/lua/keybindings/keymap.lua b/lua/keybindings/keymap.lua index 6bb2b3e..f48b3b8 100644 --- a/lua/keybindings/keymap.lua +++ b/lua/keybindings/keymap.lua @@ -49,10 +49,14 @@ vim.api.nvim_create_autocmd('TextYankPost', { end, }) +-- Vimtex +vim.api.nvim_set_keymap('n', 'v', ':VimtexCompile', { silent = true }) + -- Telescope bindings local builtin = require('telescope.builtin') vim.keymap.set('n', 'f', builtin.find_files, {}) vim.keymap.set('n', 'o', builtin.live_grep, {}) +vim.keymap.set('n', 'h', builtin.buffers, {}) vim.keymap.set('n', 'gc', builtin.git_commits, {}) vim.keymap.set('n', 'gs', builtin.git_status, {}) vim.keymap.set('n', 'gf', builtin.git_files, {}) diff --git a/lua/plugin/formatter.lua b/lua/plugin/formatter.lua new file mode 100644 index 0000000..c444456 --- /dev/null +++ b/lua/plugin/formatter.lua @@ -0,0 +1 @@ +require'formatter'.setup() diff --git a/lua/plugin/lsp_config.lua b/lua/plugin/lsp_config.lua index 7d5348a..abb33ee 100644 --- a/lua/plugin/lsp_config.lua +++ b/lua/plugin/lsp_config.lua @@ -11,6 +11,7 @@ require 'lspconfig'.bashls.setup {} require 'lspconfig'.dockerls.setup {} require 'lspconfig'.docker_compose_language_service.setup {} require 'lspconfig'.ansiblels.setup {} +require 'lspconfig'.tsserver.setup {} require 'lspconfig'.yamlls.setup {} require 'lspconfig'.lua_ls.setup { settings = { @@ -30,4 +31,6 @@ require'lspconfig'.jsonls.setup{} require'lspconfig'.gopls.setup{} require'lspconfig'.jdtls.setup{} require'lspconfig'.texlab.setup{} +require'lspconfig'.gleam.setup{} +require'lspconfig'.rust_analyzer.setup{} diff --git a/lua/plugins.lua b/lua/plugins.lua index 08eabba..726b9f6 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -1,4 +1,7 @@ return { + { + 'mhartington/formatter.nvim' + }, { "kylechui/nvim-surround", version = "*", -- Use for stability; omit to use `main` branch for the latest features