|
|
@@ -372,7 +372,7 @@ require('lazy').setup({
|
|
|
},
|
|
|
},
|
|
|
opts = {
|
|
|
- notify_on_error = false,
|
|
|
+ notify_on_error = true,
|
|
|
format_on_save = function(_)
|
|
|
-- edited by me: disable format on safe. <leader>f is good enough for
|
|
|
-- when i want to format.
|
|
|
@@ -392,6 +392,7 @@ require('lazy').setup({
|
|
|
end,
|
|
|
formatters_by_ft = {
|
|
|
lua = { 'stylua' },
|
|
|
+ ocaml = { 'ocamlformat' },
|
|
|
-- Conform can also run multiple formatters sequentially
|
|
|
-- python = { "isort", "black" },
|
|
|
--
|
|
|
@@ -504,6 +505,12 @@ require('lazy').setup({
|
|
|
},
|
|
|
|
|
|
--- THEMES FOR NEOVIM
|
|
|
+ { 'ellisonleao/gruvbox.nvim', priority = 1000, config = true, opts = {
|
|
|
+ contrast = 'hard',
|
|
|
+ italic = {
|
|
|
+ comments = false,
|
|
|
+ },
|
|
|
+ } },
|
|
|
{
|
|
|
'miikanissi/modus-themes.nvim',
|
|
|
priority = 1000,
|
|
|
@@ -513,6 +520,9 @@ require('lazy').setup({
|
|
|
},
|
|
|
line_nr_column_background = false,
|
|
|
sign_column_background = true,
|
|
|
+ style = {
|
|
|
+ comments = { italic = false },
|
|
|
+ },
|
|
|
on_colors = function(color)
|
|
|
color.bg_active = color.bg_dim
|
|
|
end,
|
|
|
@@ -596,46 +606,16 @@ require('lazy').setup({
|
|
|
-- animate.setup()
|
|
|
end,
|
|
|
},
|
|
|
- { -- Highlight, edit, and navigate code
|
|
|
- 'nvim-treesitter/nvim-treesitter',
|
|
|
- branch = 'main',
|
|
|
- build = ':TSUpdate',
|
|
|
- dependencies = {},
|
|
|
- main = 'nvim-treesitter.config', -- Sets main module to use for opts
|
|
|
- -- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
|
|
+ {
|
|
|
+ 'romus204/tree-sitter-manager.nvim',
|
|
|
+ dependencies = {}, -- tree-sitter CLI must be installed system-wide
|
|
|
opts = {
|
|
|
- ensure_installed = {
|
|
|
- 'bash',
|
|
|
- 'c',
|
|
|
- 'diff',
|
|
|
- 'html',
|
|
|
- 'lua',
|
|
|
- 'luadoc',
|
|
|
- 'markdown',
|
|
|
- 'markdown_inline',
|
|
|
- 'query',
|
|
|
- 'vim',
|
|
|
- 'vimdoc',
|
|
|
- },
|
|
|
- -- Autoinstall languages that are not installed
|
|
|
auto_install = true,
|
|
|
- highlight = {
|
|
|
- enable = true,
|
|
|
- -- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
|
|
|
- -- If you are experiencing weird indenting issues, add the language to
|
|
|
- -- the list of additional_vim_regex_highlighting and disabled languages for indent.
|
|
|
- additional_vim_regex_highlighting = { 'ruby' },
|
|
|
- },
|
|
|
- indent = { enable = true, disable = { 'ruby' } },
|
|
|
},
|
|
|
- -- There are additional nvim-treesitter modules that you can use to interact
|
|
|
- -- with nvim-treesitter. You should go explore a few and see what interests you:
|
|
|
- --
|
|
|
- -- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
|
|
|
- -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
|
|
|
- -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
|
|
|
+ config = function(_, opts)
|
|
|
+ require('tree-sitter-manager').setup(opts)
|
|
|
+ end,
|
|
|
},
|
|
|
-
|
|
|
-- The following 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.
|
|
|
@@ -684,6 +664,24 @@ require('lazy').setup({
|
|
|
})
|
|
|
|
|
|
-- Custom settings that require plugins
|
|
|
-vim.cmd 'colorscheme modus_vivendi'
|
|
|
+-- vim.cmd 'colorscheme catppuccin'
|
|
|
+vim.cmd 'colorscheme modus'
|
|
|
+vim.diagnostic.config {
|
|
|
+ virtual_text = false,
|
|
|
+}
|
|
|
+
|
|
|
+-- User command to format
|
|
|
+vim.api.nvim_create_user_command("Format", function(args)
|
|
|
+ local range = nil
|
|
|
+ if args.count ~= -1 then
|
|
|
+ local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1]
|
|
|
+ range = {
|
|
|
+ start = { args.line1, 0 },
|
|
|
+ ["end"] = { args.line2, end_line:len() },
|
|
|
+ }
|
|
|
+ end
|
|
|
+ require("conform").format({ async = true, lsp_format = "fallback", range = range })
|
|
|
+end, { range = true })
|
|
|
+
|
|
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
|
|
-- vim: ts=2 sts=2 sw=2 et
|