From d60ec7ac7901da82e077c66ec94a0544bef99fc8 Mon Sep 17 00:00:00 2001 From: GustaafL Date: Mon, 26 Feb 2024 15:31:52 +0100 Subject: [PATCH 1/5] add copilot to config Signed-off-by: GustaafL --- init.lua | 2 +- lazy-lock.json | 29 +++++++++++++++++++++++++++++ lua/custom/plugins/copilot.lua | 5 +++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 lazy-lock.json create mode 100644 lua/custom/plugins/copilot.lua diff --git a/init.lua b/init.lua index 72231f90c5e..e53bacbd9a7 100644 --- a/init.lua +++ b/init.lua @@ -803,7 +803,7 @@ require('lazy').setup({ -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- -- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, }, {}) -- The line beneath this is called `modeline`. See `:help modeline` diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 00000000000..2b70c9b091e --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,29 @@ +{ + "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, + "LuaSnip": { "branch": "master", "commit": "f3b3d3446bcbfa62d638b1903ff00a78b2b730a1" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "conform.nvim": { "branch": "master", "commit": "4c01323a67f1636d73803aad4e8e735bad7a9561" }, + "copilot.vim": { "branch": "release", "commit": "2f32e1ad0cb009225e55e22f5685fe8c75399a2b" }, + "fidget.nvim": { "branch": "main", "commit": "60404ba67044c6ab01894dd5bf77bd64ea5e09aa" }, + "friendly-snippets": { "branch": "main", "commit": "dbd45e9ba76d535e4cba88afa1b7aa43bb765336" }, + "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, + "lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "60f6805b12a12e8a912aeb2f975dec1794a8994e" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "1212fb6082b7177dde17ea65e429e027835aeb40" }, + "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, + "mini.nvim": { "branch": "main", "commit": "b7403ad0c2a4dab777244171ca1b7e8c89696584" }, + "neodev.nvim": { "branch": "main", "commit": "bbe17de89345ce40725e721d347c596dc4a02b32" }, + "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, + "nvim-lspconfig": { "branch": "master", "commit": "1699ce10c3aaf861cfa0c1303fcd19d2ed93e7ad" }, + "nvim-treesitter": { "branch": "master", "commit": "6bd108a6f10aa01b854c3c673b6d9d61662a8c93" }, + "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, + "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" }, + "tokyonight.nvim": { "branch": "main", "commit": "610179f7f12db3d08540b6cc61434db2eaecbcff" }, + "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, + "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } +} \ No newline at end of file diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua new file mode 100644 index 00000000000..88cb3b9ab90 --- /dev/null +++ b/lua/custom/plugins/copilot.lua @@ -0,0 +1,5 @@ +return { + { + 'github/copilot.vim', + }, +} From 0b6c8d2f368d4f01abdeac545f99607bc01a890d Mon Sep 17 00:00:00 2001 From: GustaafL Date: Tue, 12 Mar 2024 16:09:43 +0100 Subject: [PATCH 2/5] add rust formatter Signed-off-by: GustaafL --- init.lua | 1 + lazy-lock.json | 20 +++++++++----------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/init.lua b/init.lua index 2716f0ff0ca..f45389b8c95 100644 --- a/init.lua +++ b/init.lua @@ -611,6 +611,7 @@ require('lazy').setup({ }, formatters_by_ft = { lua = { 'stylua' }, + rust = { 'rustfmt' }, -- Conform can also run multiple formatters sequentially -- python = { "isort", "black" }, -- diff --git a/lazy-lock.json b/lazy-lock.json index 2b70c9b091e..8456442b6b6 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,25 +1,23 @@ { "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, - "LuaSnip": { "branch": "master", "commit": "f3b3d3446bcbfa62d638b1903ff00a78b2b730a1" }, + "LuaSnip": { "branch": "master", "commit": "a7a4b4682c4b3e2ba82b82a4e6e5f5a0e79dec32" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "conform.nvim": { "branch": "master", "commit": "4c01323a67f1636d73803aad4e8e735bad7a9561" }, - "copilot.vim": { "branch": "release", "commit": "2f32e1ad0cb009225e55e22f5685fe8c75399a2b" }, + "copilot.vim": { "branch": "release", "commit": "3b39e786d865df9ba77fe61624d6ee646528a809" }, "fidget.nvim": { "branch": "main", "commit": "60404ba67044c6ab01894dd5bf77bd64ea5e09aa" }, - "friendly-snippets": { "branch": "main", "commit": "dbd45e9ba76d535e4cba88afa1b7aa43bb765336" }, "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, - "lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "60f6805b12a12e8a912aeb2f975dec1794a8994e" }, + "lazy.nvim": { "branch": "main", "commit": "83493db50a434a4c5c648faf41e2ead80f96e478" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "21d33d69a81f6351e5a5f49078b2e4f0075c8e73" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "1212fb6082b7177dde17ea65e429e027835aeb40" }, - "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, + "mason.nvim": { "branch": "main", "commit": "3b5068f0fc565f337d67a2d315d935f574848ee7" }, "mini.nvim": { "branch": "main", "commit": "b7403ad0c2a4dab777244171ca1b7e8c89696584" }, - "neodev.nvim": { "branch": "main", "commit": "bbe17de89345ce40725e721d347c596dc4a02b32" }, "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, - "nvim-lspconfig": { "branch": "master", "commit": "1699ce10c3aaf861cfa0c1303fcd19d2ed93e7ad" }, - "nvim-treesitter": { "branch": "master", "commit": "6bd108a6f10aa01b854c3c673b6d9d61662a8c93" }, - "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, + "nvim-lspconfig": { "branch": "master", "commit": "94cf4adb81158817520e18d2174963d8e1424df9" }, + "nvim-treesitter": { "branch": "master", "commit": "7ff51f53b0efb6228df2e8539b51bb2e737b77f3" }, + "plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" }, From 705cfc4f8e45619ed0a1e82ac0f6c5b561b0fe95 Mon Sep 17 00:00:00 2001 From: GustaafL Date: Tue, 12 Mar 2024 16:16:32 +0100 Subject: [PATCH 3/5] add rust formatter to mason Signed-off-by: GustaafL --- init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init.lua b/init.lua index f45389b8c95..543ded83463 100644 --- a/init.lua +++ b/init.lua @@ -579,6 +579,7 @@ require('lazy').setup({ local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { 'stylua', -- Used to format lua code + 'rustfmt', -- Used to format rust code }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } From ad858e0bc5cff427628c82f16455318897618aaf Mon Sep 17 00:00:00 2001 From: GustaafL <41048720+GustaafL@users.noreply.github.com> Date: Fri, 27 Mar 2026 11:42:43 +0100 Subject: [PATCH 4/5] keep changes --- init.lua | 48 +++++++++++++++++++++++++++++++++---- lua/custom/plugins/init.lua | 14 ++++++++++- 2 files changed, 57 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 543ded83463..161f72b26a9 100644 --- a/init.lua +++ b/init.lua @@ -359,6 +359,7 @@ require('lazy').setup({ -- See `:help telescope.builtin` local builtin = require 'telescope.builtin' + local utils = require 'telescope.utils' vim.keymap.set('n', 'sh', builtin.help_tags, { desc = '[S]earch [H]elp' }) vim.keymap.set('n', 'sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' }) vim.keymap.set('n', 'sf', builtin.find_files, { desc = '[S]earch [F]iles' }) @@ -379,7 +380,7 @@ require('lazy').setup({ }) end, { desc = '[/] Fuzzily search in current buffer' }) - -- Also possible to pass additional configuration options. + -- Also possible to pass additional configuration options.ini -- See `:help telescope.builtin.live_grep()` for information about particular keys vim.keymap.set('n', 's/', function() builtin.live_grep { @@ -388,6 +389,10 @@ require('lazy').setup({ } end, { desc = '[S]earch [/] in Open Files' }) + -- Shortcut for searching your neovim configuration files + vim.keymap.set('n', 'sp', function() + builtin.find_files { cwd = utils.buffer_dir() } + end, { desc = 'Find files in cwd' }) -- Shortcut for searching your neovim configuration files vim.keymap.set('n', 'sn', function() builtin.find_files { cwd = vim.fn.stdpath 'config' } @@ -531,7 +536,41 @@ require('lazy').setup({ -- clangd = {}, -- gopls = {}, -- pyright = {}, - -- rust_analyzer = {}, + basedpyright = { + cmd = { 'basedpyright-langserver', '--stdio' }, + settings = { + basedpyright = { + analysis = { + useLibraryCodeForTypes = true, + typeCheckingMode = 'basic', + diagnosticMode = 'workspace', + autoSearchPath = true, + inlayHints = { + callArgumentNames = true, + }, + extraPaths = { + '...', + '...', + }, + }, + python = { + '/home/guus/.local/share/uv/python', + }, + }, + }, + }, + + -- ruff = {}, + rust_analyzer = { + procMacro = { + ignored = { + leptos_macro = { + 'component', + 'server', + }, + }, + }, + }, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- -- Some languages (like typescript) have entire language plugins that can be useful: @@ -580,6 +619,7 @@ require('lazy').setup({ vim.list_extend(ensure_installed, { 'stylua', -- Used to format lua code 'rustfmt', -- Used to format rust code + 'ruff', }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } @@ -614,7 +654,7 @@ require('lazy').setup({ lua = { 'stylua' }, rust = { 'rustfmt' }, -- Conform can also run multiple formatters sequentially - -- python = { "isort", "black" }, + python = { 'ruff' }, -- -- You can use a sub-list to tell conform to run *until* a formatter -- is found. @@ -772,7 +812,7 @@ require('lazy').setup({ ---@diagnostic disable-next-line: missing-fields require('nvim-treesitter.configs').setup { - ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc' }, + ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc', 'rust', 'python' }, -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) auto_install = true, highlight = { enable = true }, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8d7a..4f9a44dcee7 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,16 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information -return {} +return { + { + 'neovim/nvim-lspconfig', + init_options = { + userLanguages = { + eelixir = 'html-eex', + eruby = 'erb', + rust = 'html', + python = 'py', + }, + }, + }, +} From 390993c78e08ff81295e17c49da1c7d689cf91ff Mon Sep 17 00:00:00 2001 From: GustaafL <41048720+GustaafL@users.noreply.github.com> Date: Fri, 27 Mar 2026 12:14:07 +0100 Subject: [PATCH 5/5] keep own changes --- init.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 161f72b26a9..826a709a624 100644 --- a/init.lua +++ b/init.lua @@ -359,7 +359,6 @@ require('lazy').setup({ -- See `:help telescope.builtin` local builtin = require 'telescope.builtin' - local utils = require 'telescope.utils' vim.keymap.set('n', 'sh', builtin.help_tags, { desc = '[S]earch [H]elp' }) vim.keymap.set('n', 'sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' }) vim.keymap.set('n', 'sf', builtin.find_files, { desc = '[S]earch [F]iles' }) @@ -380,7 +379,7 @@ require('lazy').setup({ }) end, { desc = '[/] Fuzzily search in current buffer' }) - -- Also possible to pass additional configuration options.ini + -- Also possible to pass additional configuration options -- See `:help telescope.builtin.live_grep()` for information about particular keys vim.keymap.set('n', 's/', function() builtin.live_grep {