78 کامیت‌ها 740e005802 ... 5481a146e5

نویسنده SHA1 پیام تاریخ
  Nikita Chursin 5481a146e5 remove autoinstall for treesitter 3 ماه پیش
  Nikita Chursin 8c2ca67be1 removed old file tree, fixes for neotre 3 ماه پیش
  Nikita Chursin 9a974457bb custom for ncvim 3 ماه پیش
  Nikita Chursin dd53887083 tabline fixes 3 ماه پیش
  Nikita Chursin ac6c0a6bca set title for tab 3 ماه پیش
  Nikita Chursin 96b795e82d changed blamer plugin 4 ماه پیش
  Nikita Chursin e199e58284 fixed errs 5 ماه پیش
  Nikita Chursin db9f01a561 renamed bufferline -> tabline 5 ماه پیش
  Nikita Chursin 7bce4fbb96 removed logging for tabline error 5 ماه پیش
  Nikita Chursin bbde0affd7 added dir name to statusline 5 ماه پیش
  Nikita Chursin b2ce576fe2 more colors for tabline 5 ماه پیش
  Nikita Chursin d896eb28df changed tabline colors a bit 5 ماه پیش
  Nikita Chursin 27088e2b86 removed treesitter sync install 5 ماه پیش
  Nikita Chursin 1d802a0b3d removed unused code 5 ماه پیش
  Nikita Chursin ae93856d8f fixed tabpage name error 5 ماه پیش
  Nikita Chursin 9b5bdfb82d fixed tabline colors 5 ماه پیش
  Nikita Chursin 516b7b83d7 some fixxess for buffer line 5 ماه پیش
  Nikita Chursin fecb8b393e finalized lazy transition, fixed theme, fixed bufferline 5 ماه پیش
  Nikita Chursin 91d3ec7fb8 switched to lazy 6 ماه پیش
  Nikita Chursin 2adadb2ec0 formatting 10 ماه پیش
  Nikita Chursin aaf9fa2ebe plantuml and some experiments 10 ماه پیش
  Nikita Chursin cdc4a2d3ac updated telescope 11 ماه پیش
  Nikita Chursin 4d9453acc4 fixed path 11 ماه پیش
  Nikita Chursin 1b3e77ae97 debug go 11 ماه پیش
  Nikita Chursin fd6b545b3f todo configs, csv plugin, telescope rg params 11 ماه پیش
  Nikita Chursin 7f202a8fd7 dadbod completions 1 سال پیش
  Nikita Chursin 48ef00d68d a ton of stuff again :( 1 سال پیش
  Nikita Chursin 6d592187aa some config 1 سال پیش
  Nikita Chursin f4950507d9 replaced nerdtree with neotree 1 سال پیش
  Nikita Chursin b77a36787a install themes on packer setup 1 سال پیش
  Nikita Chursin 15c57b8666 install themes right away 1 سال پیش
  Nikita Chursin 77aa1537b0 preload before ncvim 1 سال پیش
  Nikita Chursin e38d1fd0a5 removed packer sync 1 سال پیش
  Nikita Chursin e393117b28 rework preload 1 سال پیش
  Nikita Chursin 5398f6587b fixed plugins 1 سال پیش
  Nikita Chursin 9a57c77637 preload fixed 1 سال پیش
  Nikita Chursin b533716b36 fixed loading plenary 1 سال پیش
  Nikita Chursin 127699c6a8 autocmd api for ncvim 1 سال پیش
  Nikita Chursin 3497e33d2d config packer right before plugins 1 سال پیش
  Nikita Chursin d88683ce05 fix load order 1 سال پیش
  Nikita Chursin 695044da45 do not require modeules on init 1 سال پیش
  Nikita Chursin 537e209794 treesitter install languages on first met 1 سال پیش
  Nikita Chursin acd71ac507 use internal functions for ui panels 1 سال پیش
  Nikita Chursin 5c1e23d11b todo plugin 1 سال پیش
  Nikita Chursin 375d8eca06 configure keymaps for symbols outline 1 سال پیش
  Nikita Chursin 36cd908267 symbols outline 1 سال پیش
  Nikita Chursin 77e14172ce fixed min-height for code actions 1 سال پیش
  Nikita Chursin 05301eb741 replace popui select with dressing 1 سال پیش
  Nikita Chursin eb0df5f1dd fixed session picker 1 سال پیش
  Nikita Chursin 747d5cf59f split refs and split impl mappings 1 سال پیش
  Nikita Chursin 7f0c7b4165 hotkey to delete buffers 1 سال پیش
  Nikita Chursin 1bf067080d session picker can remove sessions 1 سال پیش
  Nikita Chursin 0fe53187b3 custom session picker 1 سال پیش
  Nikita Chursin 5b681e10a4 fix statusline 1 سال پیش
  Nikita Chursin 1193077cf8 dbui 1 سال پیش
  Nikita Chursin e1b2df94c5 more beautiful welcome screen 1 سال پیش
  Nikita Chursin 565ac98cd1 fixed env load 1 سال پیش
  Nikita Chursin 141cc8b542 welcome screen command to open config folder 1 سال پیش
  Nikita Chursin 6b6b7ff7d4 no session auto-load 1 سال پیش
  Nikita Chursin ab2940533c ability to go to current folder from welcome screen 1 سال پیش
  Nikita Chursin f581d013bf filetree functions 1 سال پیش
  Nikita Chursin 352092f348 configured welcom screen and sessions 1 سال پیش
  Nikita Chursin 775e1ab666 fixed autopairs 1 سال پیش
  Nikita Chursin c504555928 fixed git signs 1 سال پیش
  Nikita Chursin 1aae3199b3 fixed mason configuration 1 سال پیش
  Nikita Chursin 18452dbddd fix gitsigns 1 سال پیش
  Nikita Chursin d1246f6dc0 added some comments 1 سال پیش
  Nikita Chursin c9982aebfd updated readme 1 سال پیش
  Nikita Chursin ecbaa23876 load everything in custom folder 1 سال پیش
  Nikita Chursin dfff816fe3 gitignore customizations 1 سال پیش
  Nikita Chursin 53c933c916 customizations 1 سال پیش
  Nikita Chursin 0d3d9a4f01 core->mission_control 1 سال پیش
  Nikita Chursin 12e4c4441d migrated vim_g_helpers to ncvim.lsp 1 سال پیش
  Nikita Chursin 2bbccd16ed telescope ui select 1 سال پیش
  Nikita Chursin 126a606283 removed mapping utils 1 سال پیش
  Nikita Chursin bd26c1174f removed plugins_config folder as everything is migrated to ncvim 1 سال پیش
  Nikita Chursin 3add02e26a removed core folder as all the code migrated to ncvim 1 سال پیش
  Nikita Chursin 547038e32b initial ncvim config 1 سال پیش

+ 1 - 0
.gitignore

@@ -1,3 +1,4 @@
 *.bak*
 plugin/
 .luarc.json
+lua/custom/*

+ 10 - 1
README.md

@@ -1,4 +1,13 @@
-# nchursin neovim config
+# NcVim
+
+## What is this?
+
+My own Neovim config. The main thing I don't like in AstroNvim and others is that they tend to be more usual IDEs -like. I'm pretty used to Vim hotkeys, so I created my own config with little overrides. E.g. to save a file you still need to do `:w`. And if you like you can bind it to a hotkey.
+
+## Features
+
+* As little custom mappings as possible
+* Loads `.env.lua` from your project folder to specify environment variables or project specific settings.
 
 ## Installation
 

+ 2 - 3
init.lua

@@ -1,5 +1,4 @@
-require('ncvim')
 require('preload')
-require('core')
-require('plugins_config')
+require('ncvim')
+require('load_custom')
 require('setup_ncvim')

+ 0 - 45
lua/core/autocmd.lua

@@ -1,58 +0,0 @@
-local autocmd = vim.api.nvim_create_autocmd
-local cmd = vim.cmd
-
-local function get_path(str, sep)
-  sep = sep or '/'
-  return str:match("(.*" .. sep .. ")")
-end
-
-local function file_exists(name)
-  local f = io.open(name, "r")
-  if f ~= nil then
-    io.close(f)
-    return true
-  else
-    return false
-  end
-end
-
-autocmd(
-  'VimEnter',
-  {
-    pattern = '*',
-    callback = function(ev)
-      local opened = ev.file
-      local folder_opened = string.find(opened, 'NERD_tree')
-      if folder_opened then
-        local folder = get_path(opened)
-        local exist = file_exists(folder .. '.env.lua')
-        if exist then
-          cmd('source ' .. folder .. '.env.lua')
-        end
-      end
-    end,
-  }
-)
-
-autocmd(
-  'BufWritePre',
-  {
-    pattern = '*',
-    command = ':%s/\\s\\+$//e'
-  }
-)
-
-

+ 0 - 4
lua/core/cmp_lsp/autocmd.lua

@@ -1,22 +0,0 @@
-local autocmd = vim.api.nvim_create_autocmd
-
---
---

+ 0 - 72
lua/core/cmp_lsp/cmp/config.lua

@@ -1,76 +0,0 @@
-local fn = vim.fn
-
-local cmp = require 'cmp'
-local types = require('cmp.types')
-
-cmp.setup({
-  snippet = {
-    -- REQUIRED - you must specify a snippet engine
-    expand = function(args)
-      fn["vsnip#anonymous"](args.body)       -- For `vsnip` users.
-      -- require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
-      -- require('snippy').expand_snippet(args.body) -- For `snippy` users.
-      -- fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
-    end,
-  },
-  window = {
-    -- completion = cmp.config.window.bordered(),
-    -- documentation = cmp.config.window.bordered(),
-  },
-  mapping = cmp.mapping.preset.insert({
-    ['<C-b>'] = cmp.mapping.scroll_docs(-4),
-    ['<C-f>'] = cmp.mapping.scroll_docs(4),
-    ['<C-Space>'] = cmp.mapping.complete(),
-    ['<C-e>'] = cmp.mapping.abort(),
-    ['<CR>'] = cmp.mapping.confirm({ select = true }),     -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
-    ['<C-j>'] = {
-      i = cmp.mapping.select_next_item({ behavior = types.cmp.SelectBehavior.Insert }),
-    },
-    ['<C-k>'] = {
-      i = cmp.mapping.select_prev_item({ behavior = types.cmp.SelectBehavior.Insert }),
-    },
-  }),
-  sources = cmp.config.sources({
-    { name = 'nvim_lsp' },
-    { name = 'vsnip' },     -- For vsnip users.
-    -- { name = 'luasnip' }, -- For luasnip users.
-    -- { name = 'ultisnips' }, -- For ultisnips users.
-    -- { name = 'snippy' }, -- For snippy users.
-  }, {
-    { name = 'buffer' },
-  })
-})
-
-cmp.setup.filetype('gitcommit', {
-  sources = cmp.config.sources({
-    { name = 'cmp_git' },     -- You can specify the `cmp_git` source if you were installed it.
-  }, {
-    { name = 'buffer' },
-  })
-})
-
-cmp.setup.cmdline('/', {
-  mapping = cmp.mapping.preset.cmdline(),
-  sources = {
-    { name = 'buffer' }
-  }
-})
-
-cmp.setup.cmdline(':', {
-  mapping = cmp.mapping.preset.cmdline(),
-  sources = cmp.config.sources({
-    { name = 'path' }
-  }, {
-    { name = 'cmdline' }
-  })
-})
-
-require('nvim-lightbulb').setup({
-  autocmd = {
-    enabled = true
-  }
-})

+ 0 - 1
lua/core/cmp_lsp/cmp/init.lua

@@ -1 +0,0 @@
-require('core.cmp_lsp.cmp.config')

+ 0 - 3
lua/core/cmp_lsp/init.lua

@@ -1,3 +0,0 @@
-require('core.cmp_lsp.cmp')
-require('core.cmp_lsp.mason')
-require('core.cmp_lsp.autocmd')

+ 0 - 83
lua/core/cmp_lsp/mason/config.lua

@@ -1,83 +0,0 @@
-local map = vim.keymap.set
-local api = vim.api
-local lsp = vim.lsp
-
-local lspconfig = require('lspconfig')
-
-local bufopts = {
-  noremap = true,
-  silent = true,
-  -- buffer=bufnr
-}
-
-local capabilities = require('cmp_nvim_lsp').default_capabilities(lsp.protocol.make_client_capabilities())
-
-require("mason").setup({
-  check_outdated_packages_on_open = true,
-
-  registries = {
-    "github:mason-org/mason-registry",
-    "lua:mason-registry.index"
-  },
-
-  ui = {
-    icons = {
-      package_installed = "✓",
-      package_pending = "➜",
-      package_uninstalled = "✗"
-    }
-  }
-})
-
-require("mason-lspconfig").setup({
-  ensure_installed = {
-    'lua_ls',
-    'editorconfig-checker',
-  }
-})
-
-local on_attach = function(client, bufnr)
-  -- Enable completion triggered by <c-x><c-o>
-  api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
-
-  map('n', '<leader>rn', '<cmd> lua vim.lsp.buf.rename()<CR>', bufopts)
-  map('n', '<leader>qf', '<cmd> lua vim.lsp.buf.code_action()<CR>', bufopts)
-
-  require("lsp-format").on_attach(client)
-end
-
-require("mason-lspconfig").setup_handlers({
-  function(server_name)
-    lspconfig[server_name].setup {
-      on_attach = on_attach,
-      capabilities = capabilities,
-    }
-  end,
-
-  ['lua_ls'] = function()
-    lspconfig.lua_ls.setup {
-      on_attach = on_attach,
-      capabilities = capabilities,
-      settings = {
-        Lua = {
-          runtime = {
-            -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
-            version = 'LuaJIT',
-          },
-          diagnostics = {
-            -- Get the language server to recognize the `vim` global
-            globals = { 'vim' },
-          },
-          workspace = {
-            -- Make the server aware of Neovim runtime files
-            library = vim.api.nvim_get_runtime_file("", true),
-          },
-          -- Do not send telemetry data containing a randomized but unique identifier
-          telemetry = {
-            enable = false,
-          },
-        },
-      },
-    }
-  end
-})

+ 0 - 0
lua/core/cmp_lsp/mason/init.lua


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است