@@ -163,14 +163,16 @@ vim.opt.confirm = true
163163
164164-- [[ Basic Keymaps ]]
165165-- See `:help vim.keymap.set()`
166-
166+ vim .opt .foldmethod = ' indent'
167+ vim .opt .foldlevel = 99
167168-- Clear highlights on search when pressing <Esc> in normal mode
168169-- See `:help hlsearch`
169170vim .keymap .set (' n' , ' <Esc>' , ' <cmd>nohlsearch<CR>' )
170171
171172-- Diagnostic keymaps
172173vim .keymap .set (' n' , ' <leader>q' , vim .diagnostic .setloclist , { desc = ' Open diagnostic [Q]uickfix list' })
173174
175+ vim .keymap .set (' n' , ' gn' , ' <cmd>tab split | lua vim.lsp.buf.definition()<CR>' , {})
174176-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
175177-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
176178-- is not what someone will guess without a bit more experience.
@@ -208,6 +210,16 @@ vim.api.nvim_create_autocmd('TextYankPost', {
208210 end ,
209211})
210212
213+ -- Write the last file closed and its cursor position to a temporary file
214+ vim .api .nvim_create_autocmd (' VimLeavePre' , {
215+ callback = function ()
216+ local filepath = vim .fn .expand ' %:p'
217+ local line = vim .fn .line ' .'
218+ if filepath ~= ' ' then
219+ vim .fn .writefile ({ filepath , tostring (line ) }, ' /tmp/nvim_last_closed' )
220+ end
221+ end ,
222+ })
211223-- [[ Install `lazy.nvim` plugin manager ]]
212224-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
213225local lazypath = vim .fn .stdpath ' data' .. ' /lazy/lazy.nvim'
@@ -231,6 +243,7 @@ vim.opt.rtp:prepend(lazypath)
231243-- :Lazy update
232244--
233245-- NOTE: Here is where you install your plugins.
246+
234247require (' lazy' ).setup ({
235248 -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
236249 ' tpope/vim-sleuth' , -- Detect tabstop and shiftwidth automatically
@@ -254,7 +267,8 @@ require('lazy').setup({
254267 -- }
255268 --
256269 -- Here is a more advanced example where we pass configuration
257- -- options to `gitsigns.nvim`.
270+ -- options to `gitsigns.nvim`. This is equivalent to the following Lua:
271+ -- require('gitsigns').setup { ... }
258272 --
259273 -- See `:help gitsigns` to understand what the configuration keys do
260274 { -- Adds git related signs to the gutter, as well as utilities for managing changes
@@ -270,6 +284,17 @@ require('lazy').setup({
270284 },
271285 },
272286
287+ {
288+ ' joshuavial/aider.nvim' ,
289+ opts = {
290+ -- your configuration comes here
291+ -- if you don't want to use the default settings
292+ auto_manage_context = true , -- automatically manage buffer context
293+ default_bindings = true , -- use default <leader>A keybindings
294+ debug = false , -- enable debug logging
295+ },
296+ },
297+
273298 -- NOTE: Plugins can also be configured to run Lua code when they are loaded.
274299 --
275300 -- This is often very useful to both group configuration, as well as handle
@@ -663,17 +688,17 @@ require('lazy').setup({
663688 -- - settings (table): Override the default settings passed when initializing the server.
664689 -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
665690 local servers = {
666- -- clangd = {},
691+ clangd = {},
667692 -- gopls = {},
668- -- pyright = {},
693+ pyright = {},
669694 -- rust_analyzer = {},
670695 -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
671696 --
672697 -- Some languages (like typescript) have entire language plugins that can be useful:
673698 -- https://github.com/pmizio/typescript-tools.nvim
674699 --
675700 -- But for many setups, the LSP (`ts_ls`) will work just fine
676- -- ts_ls = {},
701+ ts_ls = {},
677702 --
678703
679704 lua_ls = {
@@ -990,14 +1015,14 @@ require('lazy').setup({
9901015 -- require 'kickstart.plugins.indent_line',
9911016 -- require 'kickstart.plugins.lint',
9921017 -- require 'kickstart.plugins.autopairs',
993- -- require 'kickstart.plugins.neo-tree',
1018+ require ' kickstart.plugins.neo-tree' ,
9941019 -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
9951020
9961021 -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
9971022 -- This is the easiest way to modularize your config.
9981023 --
9991024 -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
1000- -- { import = 'custom.plugins' },
1025+ { import = ' custom.plugins' },
10011026 --
10021027 -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
10031028 -- Or use telescope!
0 commit comments