@@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
102102vim .opt .number = true
103103-- You can also add relative line numbers, to help with jumping.
104104-- Experiment for yourself to see if you like it!
105- -- vim.opt.relativenumber = true
105+ vim .opt .relativenumber = true
106106
107107-- Enable mouse mode, can be useful for resizing splits for example!
108108vim .opt .mouse = ' a'
@@ -616,7 +616,10 @@ require('lazy').setup({
616616 local servers = {
617617 -- clangd = {},
618618 -- gopls = {},
619- -- pyright = {},
619+ pyright = {},
620+ ruff = {},
621+ debugpy = {},
622+ taplo = {},
620623 -- rust_analyzer = {},
621624 -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
622625 --
@@ -709,7 +712,7 @@ require('lazy').setup({
709712 formatters_by_ft = {
710713 lua = { ' stylua' },
711714 -- Conform can also run multiple formatters sequentially
712- -- python = { " isort", " black" },
715+ python = { ' ruff_format ' , ' isort' , ' black' , stop_after_first = true },
713716 --
714717 -- You can use 'stop_after_first' to run the first available formatter from the list
715718 -- javascript = { "prettierd", "prettier", stop_after_first = true },
@@ -773,24 +776,24 @@ require('lazy').setup({
773776 -- No, but seriously. Please read `:help ins-completion`, it is really good!
774777 mapping = cmp .mapping .preset .insert {
775778 -- Select the [n]ext item
776- [' <C-n>' ] = cmp .mapping .select_next_item (),
779+ -- ['<C-n>'] = cmp.mapping.select_next_item(),
777780 -- Select the [p]revious item
778- [' <C-p>' ] = cmp .mapping .select_prev_item (),
781+ -- ['<C-p>'] = cmp.mapping.select_prev_item(),
779782
780783 -- Scroll the documentation window [b]ack / [f]orward
781- [' <C-b>' ] = cmp .mapping .scroll_docs (- 4 ),
782- [' <C-f>' ] = cmp .mapping .scroll_docs (4 ),
784+ -- ['<C-b>'] = cmp.mapping.scroll_docs(-4),
785+ -- ['<C-f>'] = cmp.mapping.scroll_docs(4),
783786
784787 -- Accept ([y]es) the completion.
785788 -- This will auto-import if your LSP supports it.
786789 -- This will expand snippets if the LSP sent a snippet.
787- [' <C-y>' ] = cmp .mapping .confirm { select = true },
790+ -- ['<C-y>'] = cmp.mapping.confirm { select = true },
788791
789792 -- If you prefer more traditional completion keymaps,
790793 -- you can uncomment the following lines
791- -- ['<CR>'] = cmp.mapping.confirm { select = true },
792- -- ['<Tab>'] = cmp.mapping.select_next_item(),
793- -- ['<S-Tab>'] = cmp.mapping.select_prev_item(),
794+ [' <CR>' ] = cmp .mapping .confirm { select = true },
795+ [' <Tab>' ] = cmp .mapping .select_next_item (),
796+ [' <S-Tab>' ] = cmp .mapping .select_prev_item (),
794797
795798 -- Manually trigger a completion from nvim-cmp.
796799 -- Generally you don't need this, because nvim-cmp will display
@@ -829,6 +832,12 @@ require('lazy').setup({
829832 { name = ' luasnip' },
830833 { name = ' path' },
831834 },
835+ cmp .setup .filetype ({ ' sql' }, {
836+ sources = {
837+ { name = ' vim-dadbod-completion' },
838+ { name = ' buffer' },
839+ },
840+ }),
832841 }
833842 end ,
834843 },
@@ -838,13 +847,16 @@ require('lazy').setup({
838847 -- change the command in the config to whatever the name of that colorscheme is.
839848 --
840849 -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
841- ' folke/tokyonight.nvim' ,
850+ -- 'folke/tokyonight.nvim',
851+ ' rose-pine/neovim' ,
842852 priority = 1000 , -- Make sure to load this before all the other start plugins.
843853 init = function ()
844854 -- Load the colorscheme here.
845855 -- Like many other themes, this one has different styles, and you could load
846856 -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
847- vim .cmd .colorscheme ' tokyonight-night'
857+ -- vim.cmd.colorscheme 'tokyonight-night'
858+ -- vim.cmd.colorscheme 'rose-pine'
859+ vim .cmd .colorscheme ' retrobox'
848860
849861 -- You can configure highlights by doing something like:
850862 vim .cmd .hi ' Comment gui=none'
@@ -854,50 +866,68 @@ require('lazy').setup({
854866 -- Highlight todo, notes, etc in comments
855867 { ' folke/todo-comments.nvim' , event = ' VimEnter' , dependencies = { ' nvim-lua/plenary.nvim' }, opts = { signs = false } },
856868
857- { -- Collection of various small independent plugins/modules
858- ' echasnovski/mini.nvim' ,
859- config = function ()
860- -- Better Around/Inside textobjects
861- --
862- -- Examples:
863- -- - va) - [V]isually select [A]round [)]paren
864- -- - yinq - [Y]ank [I]nside [N]ext [Q]uote
865- -- - ci' - [C]hange [I]nside [']quote
866- require (' mini.ai' ).setup { n_lines = 500 }
869+ -- { -- Collection of various small independent plugins/modules
870+ -- 'echasnovski/mini.nvim',
871+ -- config = function()
872+ -- -- Better Around/Inside textobjects
873+ -- --
874+ -- -- Examples:
875+ -- -- - va) - [V]isually select [A]round [)]paren
876+ -- -- - yinq - [Y]ank [I]nside [N]ext [Q]uote
877+ -- -- - ci' - [C]hange [I]nside [']quote
878+ -- require('mini.ai').setup { n_lines = 500 }
879+ --
880+ -- -- Add/delete/replace surroundings (brackets, quotes, etc.)
881+ -- --
882+ -- -- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
883+ -- -- - sd' - [S]urround [D]elete [']quotes
884+ -- -- - sr)' - [S]urround [R]eplace [)] [']
885+ -- require('mini.surround').setup()
886+ --
887+ -- -- Simple and easy statusline.
888+ -- -- You could remove this setup call if you don't like it,
889+ -- -- and try some other statusline plugin
890+ -- local statusline = require 'mini.statusline'
891+ -- -- set use_icons to true if you have a Nerd Font
892+ -- statusline.setup { use_icons = vim.g.have_nerd_font }
893+ --
894+ -- -- You can configure sections in the statusline by overriding their
895+ -- -- default behavior. For example, here we set the section for
896+ -- -- cursor location to LINE:COLUMN
897+ -- ---@diagnostic disable-next-line: duplicate-set-field
898+ -- statusline.section_location = function()
899+ -- return '%2l:%-2v'
900+ -- end
901+ --
902+ -- -- ... and there is more!
903+ -- -- Check out: https://github.com/echasnovski/mini.nvim
904+ -- end,
905+ -- },
867906
868- -- Add/delete/replace surroundings (brackets, quotes, etc.)
869- --
870- -- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
871- -- - sd' - [S]urround [D]elete [']quotes
872- -- - sr)' - [S]urround [R]eplace [)] [']
873- require (' mini.surround' ).setup ()
874-
875- -- Simple and easy statusline.
876- -- You could remove this setup call if you don't like it,
877- -- and try some other statusline plugin
878- local statusline = require ' mini.statusline'
879- -- set use_icons to true if you have a Nerd Font
880- statusline .setup { use_icons = vim .g .have_nerd_font }
881-
882- -- You can configure sections in the statusline by overriding their
883- -- default behavior. For example, here we set the section for
884- -- cursor location to LINE:COLUMN
885- --- @diagnostic disable-next-line : duplicate-set-field
886- statusline .section_location = function ()
887- return ' %2l:%-2v'
888- end
889-
890- -- ... and there is more!
891- -- Check out: https://github.com/echasnovski/mini.nvim
892- end ,
893- },
894907 { -- Highlight, edit, and navigate code
895908 ' nvim-treesitter/nvim-treesitter' ,
896909 build = ' :TSUpdate' ,
897910 main = ' nvim-treesitter.configs' , -- Sets main module to use for opts
898911 -- [[ Configure Treesitter ]] See `:help nvim-treesitter`
899912 opts = {
900- ensure_installed = { ' bash' , ' c' , ' diff' , ' html' , ' lua' , ' luadoc' , ' markdown' , ' markdown_inline' , ' query' , ' vim' , ' vimdoc' },
913+ ensure_installed = {
914+ ' bash' ,
915+ ' c' ,
916+ ' diff' ,
917+ ' html' ,
918+ ' lua' ,
919+ ' luadoc' ,
920+ ' markdown' ,
921+ ' markdown_inline' ,
922+ ' query' ,
923+ ' vim' ,
924+ ' vimdoc' ,
925+ ' python' ,
926+ ' markdown_inline' ,
927+ ' markdown' ,
928+ ' rst' ,
929+ ' ninja' ,
930+ },
901931 -- Autoinstall languages that are not installed
902932 auto_install = true ,
903933 highlight = {
@@ -937,7 +967,7 @@ require('lazy').setup({
937967 -- This is the easiest way to modularize your config.
938968 --
939969 -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
940- -- { import = 'custom.plugins' },
970+ { import = ' custom.plugins' },
941971 --
942972 -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
943973 -- Or use telescope!
@@ -965,5 +995,24 @@ require('lazy').setup({
965995 },
966996})
967997
998+ -- MiniMap = require 'mini.map'
999+ -- vim.keymap.set('n', '<leader>mt', MiniMap.toggle, { desc = 'Toggle MiniMap' })
1000+ -- vim.keymap.set('n', '<leader>mo', MiniMap.open, { desc = 'Open MiniMap' })
1001+ -- vim.keymap.set('n', '<leader>mc', MiniMap.close, { desc = 'Close MiniMap' })
1002+ -- vim.keymap.set('n', '<leader>mf', MiniMap.toggle_focus, { desc = 'Toggle MiniMap Focus' })
1003+ -- vim.keymap.set('n', '<leader>mr', MiniMap.refresh, { desc = 'Refresh MiniMap' })
1004+ -- vim.keymap.set('n', '<leader>ms', MiniMap.toggle_side, { desc = 'Toggle MiniMap side' })
1005+ --
1006+ vim .api .nvim_create_user_command (' LintProject' , function ()
1007+ vim .cmd ' !poetry run task lint'
1008+ end , {})
1009+
1010+ vim .api .nvim_create_user_command (' FormatProject' , function ()
1011+ vim .cmd ' !poetry run task format'
1012+ end , {})
1013+
1014+ vim .api .nvim_create_user_command (' ShowDiagnostic' , function ()
1015+ vim .cmd ' !lua vim.diagnostic.open_float()'
1016+ end , {})
9681017-- The line beneath this is called `modeline`. See `:help modeline`
9691018-- vim: ts=2 sts=2 sw=2 et
0 commit comments