diff --git a/.gitignore b/.gitignore index 005b535b606..427eb18c157 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.supermaven tags test.sh .luarc.json diff --git a/init.lua b/init.lua index b98ffc6198a..28909643eb4 100644 --- a/init.lua +++ b/init.lua @@ -91,7 +91,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.o` @@ -166,6 +166,13 @@ vim.o.scrolloff = 10 -- See `:help 'confirm'` vim.o.confirm = true +-- Neovide configuration +if vim.g.neovide then + vim.o.guifont = 'RobotoMono Nerd Font Mono:h10' -- text below applies for VimScript + vim.g.neovide_cursor_antialiasing = true + vim.g.neovide_cursor_vfx_mode = 'railgun' +end + -- [[ Basic Keymaps ]] -- See `:help vim.keymap.set()` @@ -173,6 +180,12 @@ vim.o.confirm = true -- See `:help hlsearch` vim.keymap.set('n', '', 'nohlsearch') +-- Redefined signs for diagnostics +vim.fn.sign_define('DiagnosticSignError', { text = '', texthl = 'DiagnosticSignError', numhl = 'DiagnosticSignError' }) +vim.fn.sign_define('DiagnosticSignWarn', { text = '', texthl = 'DiagnosticSignWarn', numhl = 'DiagnosticSignWarn' }) +vim.fn.sign_define('DiagnosticSignHint', { text = '', texthl = 'DiagnosticSignHint', numhl = 'DiagnosticSignHint' }) +vim.fn.sign_define('DiagnosticSignInfo', { text = '', texthl = 'DiagnosticSignInfo', numhl = 'DiagnosticSignInfo' }) + -- Diagnostic keymaps vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) @@ -247,6 +260,13 @@ rtp:prepend(lazypath) -- NOTE: Here is where you install your plugins. require('lazy').setup({ -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). + 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically + 'tpope/vim-rails', -- Rails integration + 'tpope/vim-fugitive', -- Support for :Git command + 'tpope/vim-surround', -- Replace string delimiters + 'tpope/vim-dispatch', -- Support for :Make command + + 'normen/vim-pio', -- Support for PlatformIO (embedded development) 'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically -- NOTE: Plugins can also be added by using a table, @@ -256,6 +276,18 @@ require('lazy').setup({ -- Use `opts = {}` to automatically pass options to a plugin's `setup()` function, forcing the plugin to be loaded. -- + { 'David-Kunz/gen.nvim', opts = { model = 'codestral' } }, + + -- File Explorer + { + 'stevearc/oil.nvim', + ---@module 'oil' + ---@type oil.SetupOpts + opts = {}, + -- Optional dependencies + dependencies = { 'nvim-tree/nvim-web-devicons' }, + }, + -- Alternatively, use `config = function() ... end` for full control over the configuration. -- If you prefer to call `setup` explicitly, use: -- { @@ -274,13 +306,13 @@ require('lazy').setup({ { -- Adds git related signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', opts = { - signs = { - add = { text = '+' }, - change = { text = '~' }, - delete = { text = '_' }, - topdelete = { text = '‾' }, - changedelete = { text = '~' }, - }, + -- signs = { + -- add = { text = '+' }, + -- change = { text = '~' }, + -- delete = { text = '_' }, + -- topdelete = { text = '‾' }, + -- changedelete = { text = '~' }, + -- }, }, }, @@ -351,6 +383,12 @@ require('lazy').setup({ }, }, + -- { + -- 'supermaven-inc/supermaven-nvim', + -- config = function() + -- require('supermaven-nvim').setup {} + -- end, + -- }, -- NOTE: Plugins can specify dependencies. -- -- The dependencies are proper plugin specifications as well - anything @@ -461,7 +499,6 @@ require('lazy').setup({ end, { desc = '[S]earch [N]eovim files' }) end, }, - -- LSP Plugins { -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins @@ -475,6 +512,24 @@ require('lazy').setup({ }, }, }, + { 'Bilal2453/luvit-meta', lazy = true }, + { + 'mfussenegger/nvim-dap', + dependencies = { + 'suketa/nvim-dap-ruby', + }, + config = function() + require('dap-ruby').setup() + end, + }, + { -- Permit to display errors and warnings in the quickfix + 'folke/trouble.nvim', + dependencies = { 'nvim-tree/nvim-web-devicons' }, + opts = { + -- your configuration comes here + }, + }, + { -- Main LSP Configuration 'neovim/nvim-lspconfig', @@ -683,6 +738,7 @@ require('lazy').setup({ -- But for many setups, the LSP (`ts_ls`) will work just fine -- ts_ls = {}, -- + -- html = { filetypes = { 'html', 'eruby' } }, lua_ls = { -- cmd = { ... }, @@ -729,6 +785,12 @@ require('lazy').setup({ -- by the server configuration above. Useful when disabling -- certain features of an LSP (for example, turning off formatting for ts_ls) server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {}) + if server.server_name == 'solargraph' then + server.cmd = { 'asdf', 'exec', 'solargraph', 'stdio' } + end + if server.server_name == 'ruby-lsp' then + server.cmd = { 'asdf', 'exec', 'ruby-lsp' } + end require('lspconfig')[server_name].setup(server) end, }, @@ -810,6 +872,7 @@ require('lazy').setup({ }, 'folke/lazydev.nvim', }, + --- @module 'blink.cmp' --- @type blink.cmp.Config opts = { @@ -901,6 +964,32 @@ require('lazy').setup({ -- Highlight todo, notes, etc in comments { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, + { + 'olimorris/codecompanion.nvim', + opts = {}, + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-treesitter/nvim-treesitter', + }, + config = function() + require('codecompanion').setup { + strategies = { + chat = { adapter = 'anthropic' }, + inline = { adapter = 'anthropic' }, + }, + } + end, + }, + + -- A task runner and job management plugin for Neovim + { + 'stevearc/overseer.nvim', + opts = {}, + config = function() + require('overseer').setup() + end, + }, + { -- Collection of various small independent plugins/modules 'echasnovski/mini.nvim', config = function() @@ -917,7 +1006,7 @@ require('lazy').setup({ -- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren -- - sd' - [S]urround [D]elete [']quotes -- - sr)' - [S]urround [R]eplace [)] ['] - require('mini.surround').setup() + -- require('mini.surround').setup() -- Simple and easy statusline. -- You could remove this setup call if you don't like it, @@ -964,7 +1053,24 @@ require('lazy').setup({ -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects }, - -- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the + -- cheat.sh + { 'dbeniamine/cheat.sh-vim' }, + + -- Treewalker for nvim-treesitter based movements + { + 'aaronik/treewalker.nvim', + opts = { + highlight = true, -- default is false + }, + config = function() + vim.api.nvim_set_keymap('n', '', ':Treewalker Down', { noremap = true }) + vim.api.nvim_set_keymap('n', '', ':Treewalker Up', { noremap = true }) + vim.api.nvim_set_keymap('n', '', ':Treewalker Left', { noremap = true }) + vim.api.nvim_set_keymap('n', '', ':Treewalker Right', { noremap = true }) + end, + }, + + -- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the -- init.lua. If you want these files, they are in the repository, so you can just download them and -- place them in the correct locations. @@ -975,10 +1081,10 @@ require('lazy').setup({ -- -- require 'kickstart.plugins.debug', -- require 'kickstart.plugins.indent_line', - -- require 'kickstart.plugins.lint', - -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', - -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + require 'kickstart.plugins.lint', + require 'kickstart.plugins.autopairs', + require 'kickstart.plugins.neo-tree', + require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. diff --git a/lua/kickstart/plugins/lint.lua b/lua/kickstart/plugins/lint.lua index dec42f097c6..606b958595b 100644 --- a/lua/kickstart/plugins/lint.lua +++ b/lua/kickstart/plugins/lint.lua @@ -7,6 +7,7 @@ return { local lint = require 'lint' lint.linters_by_ft = { markdown = { 'markdownlint' }, + eruby = { 'erb_lint' }, } -- To allow other plugins to add linters to require('lint').linters_by_ft,