Cocoa 2 mesiacov pred
rodič
commit
d31c9da0c8

+ 2 - 0
nvim-ks/dot-config/kickstart-nvim/after/ftplugin/ocaml.lua

@@ -0,0 +1,2 @@
+vim.o.sw=2
+vim.o.ts=2

+ 36 - 38
nvim-ks/dot-config/kickstart-nvim/init.lua

@@ -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

+ 3 - 0
nvim-ks/dot-config/kickstart-nvim/lua/custom/plugins/dadbod.lua

@@ -0,0 +1,3 @@
+return {
+  "tpope/vim-dadbod",
+}

+ 12 - 3
nvim-ks/dot-config/kickstart-nvim/lua/custom/plugins/lspconfig.lua

@@ -274,14 +274,14 @@ return {
       vim.lsp.enable 'emmet_ls'
       vim.lsp.enable 'eslint'
       vim.lsp.enable 'html'
-      vim.lsp.enable 'css'
       vim.lsp.enable 'phptools'
-      vim.lsp.enable 'ccls'
+      vim.lsp.enable 'cssls'
       vim.lsp.enable 'ts_ls'
 
       -- python
-      vim.lsp.enable 'pylsp'
+      vim.lsp.enable 'basedpyright'
       vim.lsp.enable 'ruff'
+      vim.lsp.enable 'ty'
 
       -- julia jetls
       vim.lsp.config('jetls', {
@@ -313,6 +313,15 @@ return {
 
       -- haskell
       vim.lsp.enable 'hls'
+
+      -- ocamlsp
+      vim.lsp.enable 'ocamllsp'
+
+      -- elixir
+      vim.lsp.enable 'elixirls'
+
+      -- gleam
+      vim.lsp.enable 'gleam'
     end, -- endfn config
   },
 

+ 1 - 1
nvim-ks/dot-config/kickstart-nvim/lua/custom/plugins/snacks.lua

@@ -6,7 +6,7 @@ return {
   opts = {
     bigfile = { enabled = true },
     dashboard = { enabled = false },
-    explorer = { enabled = true },
+    explorer = { enabled = true, finder = 'fdfind' },
     indent = { enabled = true },
     input = { enabled = true },
     notifier = {

+ 0 - 3
nvim-ks/dot-config/kickstart-nvim/lua/custom/plugins/treesitter-textobjects.lua

@@ -1,8 +1,5 @@
 return { -- Treesitter objects
   'nvim-treesitter/nvim-treesitter-textobjects',
-  dependencies = {
-    'nvim-treesitter/nvim-treesitter',
-  },
   lazy = false,
   branch = 'main',
   config = function()

+ 39 - 0
nvim-ks/dot-config/kickstart-nvim/lua/custom/plugins/trouble.lua

@@ -0,0 +1,39 @@
+return {
+  {
+    'folke/trouble.nvim',
+    opts = {}, -- for default options, refer to the configuration section for custom setup.
+    cmd = 'Trouble',
+    keys = {
+      {
+        '<leader>X',
+        '<cmd>Trouble diagnostics toggle<cr>',
+        desc = 'Diagnostics (Trouble)',
+      },
+      {
+        '<leader>xX',
+        '<cmd>Trouble diagnostics toggle filter.buf=0<cr>',
+        desc = 'Buffer Diagnostics (Trouble)',
+      },
+      {
+        '<leader>cs',
+        '<cmd>Trouble symbols toggle focus=false<cr>',
+        desc = 'Symbols (Trouble)',
+      },
+      {
+        '<leader>cl',
+        '<cmd>Trouble lsp toggle focus=false win.position=right<cr>',
+        desc = 'LSP Definitions / references / ... (Trouble)',
+      },
+      {
+        '<leader>xL',
+        '<cmd>Trouble loclist toggle<cr>',
+        desc = 'Location List (Trouble)',
+      },
+      {
+        '<leader>xQ',
+        '<cmd>Trouble qflist toggle<cr>',
+        desc = 'Quickfix List (Trouble)',
+      },
+    },
+  },
+}

+ 0 - 5
nvim-ks/dot-config/kickstart-nvim/lua/custom/plugins/vimgo.lua

@@ -1,5 +0,0 @@
-return {
-  {
-    "fatih/vim-go",
-  }
-}