Cocoa 8 місяців тому
батько
коміт
57901a1b4a

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

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

+ 44 - 10
nvim-ks/dot-config/kickstart-nvim/init.lua

@@ -2,7 +2,7 @@
 -- See `:help mapleader`
 --  NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
 vim.g.mapleader = ' '
-vim.g.maplocalleader = ' '
+vim.g.maplocalleader = '\\'
 
 -- Set to true if you have a Nerd Font installed and selected in the terminal
 vim.g.have_nerd_font = true
@@ -12,6 +12,16 @@ vim.g.have_nerd_font = true
 -- NOTE: You can change these options as you wish!
 --  For more options, you can see `:help option-list`
 
+-- formatoptions add "r"
+vim.o.formatoptions = 'jcroql'
+--   j = true,
+--   c = true,
+--   r = true,
+--   o = true,
+--   q = true,
+--   l = true,
+-- }
+
 -- Set default indent and shift width to 4
 vim.o.shiftwidth = 4
 vim.o.tabstop = 4
@@ -35,9 +45,9 @@ vim.o.mouse = 'a'
 vim.o.showmode = false
 
 -- Use LSP for folding when possible
-vim.o.foldmethod="expr"
-vim.o.foldexpr="v:lua.vim.lsp.foldexpr()"
-vim.o.foldlevelstart=99
+vim.o.foldmethod = 'expr'
+vim.o.foldexpr = 'v:lua.vim.lsp.foldexpr()'
+vim.o.foldlevelstart = 99
 
 -- Sync clipboard between OS and Neovim.
 --  Schedule the setting after `UiEnter` because it can increase startup-time.
@@ -155,11 +165,10 @@ vim.api.nvim_create_autocmd('TextYankPost', {
 
 -- Fix caret jumping around when pressing tab. Requires luasnip
 -- https://github.com/NvChad/NvChad/issues/1223#issuecomment-1159392548
-vim.api.nvim_create_autocmd("InsertLeave", {
+vim.api.nvim_create_autocmd('InsertLeave', {
   callback = function()
-    if require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
-      and not require("luasnip").session.jump_active then
-      require("luasnip").unlink_current()
+    if require('luasnip').session.current_nodes[vim.api.nvim_get_current_buf()] and not require('luasnip').session.jump_active then
+      require('luasnip').unlink_current()
     end
   end,
 })
@@ -422,6 +431,9 @@ require('lazy').setup({
           -- },
         },
         opts = {},
+        config = function()
+          require('luasnip.loaders.from_lua').load { paths = '~/.config/kickstart-nvim/snippets/lua/' }
+        end,
       },
       'folke/lazydev.nvim',
     },
@@ -491,6 +503,19 @@ require('lazy').setup({
     },
   },
 
+  --- THEMES FOR NEOVIM
+  {
+    'miikanissi/modus-themes.nvim',
+    priority = 1000,
+    opts = {
+      variant = 'tinted',
+      line_nr_column_background = false,
+      sign_column_background = true,
+      on_colors = function(color)
+        color.bg_active = color.bg_dim
+      end,
+    },
+  },
   {
     'folke/tokyonight.nvim',
     priority = 1000, -- Make sure to load this before all the other start plugins.
@@ -503,6 +528,16 @@ require('lazy').setup({
       }
     end,
   },
+  {
+    'Yazeed1s/oh-lucy.nvim',
+    priority = 1000,
+  },
+  {
+    'embark-theme/vim',
+    lazy = false,
+    priority = 1000,
+    name = 'embark',
+  },
 
   -- Highlight todo, notes, etc in comments
   { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
@@ -643,8 +678,7 @@ require('lazy').setup({
   },
 })
 
-
 -- Custom settings that require plugins
-vim.cmd 'colorscheme tokyonight-moon'
+vim.cmd 'colorscheme modus_vivendi'
 -- The line beneath this is called `modeline`. See `:help modeline`
 -- vim: ts=2 sts=2 sw=2 et

+ 19 - 0
nvim-ks/dot-config/kickstart-nvim/lua/custom/plugins/lspconfig.lua

@@ -269,6 +269,8 @@ return {
           })
         end,
       })
+
+      -- HTML/CSS/JS + PHP
       vim.lsp.enable 'emmet_ls'
       vim.lsp.enable 'eslint'
       vim.lsp.enable 'html'
@@ -291,6 +293,23 @@ return {
         root_markers = { 'Project.toml' },
       })
       vim.lsp.enable 'jetls'
+
+      -- gopls
+      vim.lsp.enable 'gopls'
+
+      -- rust_analyzer
+      vim.lsp.enable 'rust_analyzer'
+
+      -- typst: tinymist
+      vim.lsp.config('tinymist', {
+        settings = {
+          exportPdf = 'onSave',
+        },
+      })
+      vim.lsp.enable 'tinymist'
+
+      -- zig
+      vim.lsp.enable 'zls'
     end, -- endfn config
   },
 

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

@@ -5,7 +5,7 @@ return {
   ---@type snacks.Config
   opts = {
     bigfile = { enabled = true },
-    dashboard = { enabled = true },
+    dashboard = { enabled = false },
     explorer = { enabled = true },
     indent = { enabled = true },
     input = { enabled = true },
@@ -163,34 +163,34 @@ return {
       desc = 'Git Log File',
     },
     -- gh
-    {
-      '<leader>gi',
-      function()
-        Snacks.picker.gh_issue()
-      end,
-      desc = 'GitHub Issues (open)',
-    },
-    {
-      '<leader>gI',
-      function()
-        Snacks.picker.gh_issue { state = 'all' }
-      end,
-      desc = 'GitHub Issues (all)',
-    },
-    {
-      '<leader>gp',
-      function()
-        Snacks.picker.gh_pr()
-      end,
-      desc = 'GitHub Pull Requests (open)',
-    },
-    {
-      '<leader>gP',
-      function()
-        Snacks.picker.gh_pr { state = 'all' }
-      end,
-      desc = 'GitHub Pull Requests (all)',
-    },
+    -- {
+    --   '<leader>gi',
+    --   function()
+    --     Snacks.picker.gh_issue()
+    --   end,
+    --   desc = 'GitHub Issues (open)',
+    -- },
+    -- {
+    --   '<leader>gI',
+    --   function()
+    --     Snacks.picker.gh_issue { state = 'all' }
+    --   end,
+    --   desc = 'GitHub Issues (all)',
+    -- },
+    -- {
+    --   '<leader>gp',
+    --   function()
+    --     Snacks.picker.gh_pr()
+    --   end,
+    --   desc = 'GitHub Pull Requests (open)',
+    -- },
+    -- {
+    --   '<leader>gP',
+    --   function()
+    --     Snacks.picker.gh_pr { state = 'all' }
+    --   end,
+    --   desc = 'GitHub Pull Requests (all)',
+    -- },
     -- Grep
     {
       '<leader>sb',

+ 19 - 0
nvim-ks/dot-config/kickstart-nvim/snippets/lua/go.lua

@@ -0,0 +1,19 @@
+return {
+  s('nerr', {
+    t { 'if err != nil {', '' },
+    t '\t', i(1),
+    t { '', '}' },
+  }),
+  s('derr', {
+    t 'if err := ',
+    i(1),
+    t { '; err != nil {', '\t' },
+    i(2),
+    t { '', '}' },
+  }),
+  s('isnil', {
+    t 'if ',
+    i(1),
+    t { ' == nil {', '', '}' },
+  }),
+}