From 3c9a585f833113c3a6be1621fbe640ef30e3498a Mon Sep 17 00:00:00 2001 From: ThirstyKanta Date: Sat, 1 Nov 2025 20:25:18 +0900 Subject: [PATCH 1/2] My favorit plugins and customs --- index.php | 2 ++ init.lua | 18 ++++++++++++------ lua/custom/keymaps/keymap.lua | 6 ++++++ lua/custom/plugins/auto-save.lua | 5 +++++ lua/custom/plugins/coc.lua | 1 + lua/custom/plugins/flutter.lua | 9 +++++++++ lua/custom/plugins/hlchunk.lua | 7 +++++++ lua/custom/plugins/nvim-ufo.lua | 9 +++++++++ 8 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 index.php create mode 100644 lua/custom/keymaps/keymap.lua create mode 100644 lua/custom/plugins/auto-save.lua create mode 100644 lua/custom/plugins/coc.lua create mode 100644 lua/custom/plugins/flutter.lua create mode 100644 lua/custom/plugins/hlchunk.lua create mode 100644 lua/custom/plugins/nvim-ufo.lua diff --git a/index.php b/index.php new file mode 100644 index 00000000000..f3be13cbcdc --- /dev/null +++ b/index.php @@ -0,0 +1,2 @@ +s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) vim.keymap.set('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) + ---Setting Custom key map + vim.api.nvim_create_autocmd('FileType', { + pattern = 'dart', + callback = function() + vim.keymap.set('n', '', ':!dart run %', { desc = 'Run Dart file' }) + end, + }) + -- Slightly advanced example of overriding default behavior and theme vim.keymap.set('n', '/', function() -- You can pass additional configuration to Telescope to change the theme, layout, etc. @@ -718,7 +725,6 @@ require('lazy').setup({ 'stylua', -- Used to format Lua code }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } - require('mason-lspconfig').setup { ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer) automatic_installation = false, @@ -976,15 +982,15 @@ 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.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. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- Or use telescope! diff --git a/lua/custom/keymaps/keymap.lua b/lua/custom/keymaps/keymap.lua new file mode 100644 index 00000000000..98f85ce4552 --- /dev/null +++ b/lua/custom/keymaps/keymap.lua @@ -0,0 +1,6 @@ +vim.api.nvim_create_autocmd('FileType', { + pattern = 'dart', + callback = function() + vim.keymap.set('n', '', ':!dart run %', { desc = 'Run Dart file' }) + end, +}) diff --git a/lua/custom/plugins/auto-save.lua b/lua/custom/plugins/auto-save.lua new file mode 100644 index 00000000000..cf3ff4b5504 --- /dev/null +++ b/lua/custom/plugins/auto-save.lua @@ -0,0 +1,5 @@ +return { + 'pocco81/auto-save.nvim', + lazy = false, + config = true, +} diff --git a/lua/custom/plugins/coc.lua b/lua/custom/plugins/coc.lua new file mode 100644 index 00000000000..598c83c2ee4 --- /dev/null +++ b/lua/custom/plugins/coc.lua @@ -0,0 +1 @@ +return { 'neoclide/coc.nvim', branch = 'release' } diff --git a/lua/custom/plugins/flutter.lua b/lua/custom/plugins/flutter.lua new file mode 100644 index 00000000000..c224327b18a --- /dev/null +++ b/lua/custom/plugins/flutter.lua @@ -0,0 +1,9 @@ +return { + 'nvim-flutter/flutter-tools.nvim', + lazy = false, + dependencies = { + 'nvim-lua/plenary.nvim', + 'stevearc/dressing.nvim', -- optional for vim.ui.select + }, + config = true, +} diff --git a/lua/custom/plugins/hlchunk.lua b/lua/custom/plugins/hlchunk.lua new file mode 100644 index 00000000000..7b12aede693 --- /dev/null +++ b/lua/custom/plugins/hlchunk.lua @@ -0,0 +1,7 @@ +return { + 'shellRaining/hlchunk.nvim', + event = { 'BufReadPre', 'BufNewFile' }, + config = function() + require('hlchunk').setup {} + end, +} diff --git a/lua/custom/plugins/nvim-ufo.lua b/lua/custom/plugins/nvim-ufo.lua new file mode 100644 index 00000000000..b417ec7b7d1 --- /dev/null +++ b/lua/custom/plugins/nvim-ufo.lua @@ -0,0 +1,9 @@ +return { + 'kevinhwang91/nvim-ufo', + lazy = false, + + dependencies = { + 'kevinhwang91/promise-async', + }, + config = false, +} From 84641af224e1ae1e3f5da037def3346d2a9f2e39 Mon Sep 17 00:00:00 2001 From: ThirstyKanta Date: Sun, 9 Nov 2025 19:11:22 +0900 Subject: [PATCH 2/2] hello --- README.md | 4 ++-- init.lua | 26 ++++++++++++-------------- lua/custom/keymaps/init.lua | 27 +++++++++++++++++++++++++++ lua/custom/plugins/hlchunk.lua | 17 ++++++++++++++++- 4 files changed, 57 insertions(+), 17 deletions(-) create mode 100644 lua/custom/keymaps/init.lua diff --git a/README.md b/README.md index 4113950550d..5ea067e3069 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,8 @@ If you are experiencing issues, please make sure you have the latest versions. External Requirements: - Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`) - [ripgrep](https://github.com/BurntSushi/ripgrep#installation), - [fd-find](https://github.com/sharkdp/fd#installation) -- Clipboard tool (xclip/xsel/win32yank or other depending on the platform) +- [fd-find](https://github.com/sharkdp/fd#installation) +- Clipboard tool (xclip/xsel/win32yank or other dependiing on the platform) - A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons - if you have it set `vim.g.have_nerd_font` in `init.lua` to true - Emoji fonts (Ubuntu only, and only if you want emoji!) `sudo apt install fonts-noto-color-emoji` diff --git a/init.lua b/init.lua index f3df5ee22f8..8136384172c 100644 --- a/init.lua +++ b/init.lua @@ -40,7 +40,6 @@ What is Kickstart? - :help lua-guide - (or HTML version): https://neovim.io/doc/user/lua-guide.html -Kickstart Guide: TODO: The very first thing you should do is to run the command `:Tutor` in Neovim. @@ -166,6 +165,7 @@ vim.o.scrolloff = 10 vim.o.confirm = true -- [[ Basic Keymaps ]] + -- See `:help vim.keymap.set()` -- Clear highlights on search when pressing in normal mode @@ -436,14 +436,6 @@ require('lazy').setup({ vim.keymap.set('n', 's.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) vim.keymap.set('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) - ---Setting Custom key map - vim.api.nvim_create_autocmd('FileType', { - pattern = 'dart', - callback = function() - vim.keymap.set('n', '', ':!dart run %', { desc = 'Run Dart file' }) - end, - }) - -- Slightly advanced example of overriding default behavior and theme vim.keymap.set('n', '/', function() -- You can pass additional configuration to Telescope to change the theme, layout, etc. @@ -497,11 +489,11 @@ require('lazy').setup({ { 'j-hui/fidget.nvim', opts = {} }, -- Allows extra capabilities provided by blink.cmp - 'saghen/blink.cmp', + { 'saghen/blink.cmp' }, }, config = function() -- Brief aside: **What is LSP?** - -- + -- LSP is an initialism you've probably heard, but might not understand what it is. -- -- LSP stands for Language Server Protocol. It's a protocol that helps editors @@ -842,7 +834,12 @@ require('lazy').setup({ -- -- See :h blink-cmp-config-keymap for defining your own keymap preset = 'default', - + [''] = { 'select_prev', 'snippet_backward', 'fallback' }, + [''] = { 'select_next', 'snippet_forward', 'fallback' }, + [''] = { 'accept', 'fallback' }, + [''] = { 'hide', 'fallback' }, + [''] = { 'scroll_documentation_up', 'fallback' }, + [''] = { 'scroll_documentation_down', 'fallback' }, -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see: -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps }, @@ -985,10 +982,8 @@ require('lazy').setup({ 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. - -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. { import = 'custom.plugins' }, -- @@ -1018,5 +1013,8 @@ require('lazy').setup({ }, }) +--custom key map +require 'custom.keymaps.init' + -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et diff --git a/lua/custom/keymaps/init.lua b/lua/custom/keymaps/init.lua new file mode 100644 index 00000000000..526cb57fa1d --- /dev/null +++ b/lua/custom/keymaps/init.lua @@ -0,0 +1,27 @@ +--keymap reset +vim.keymap.del('i', '') +vim.keymap.del('i', '') + +--dart +vim.api.nvim_create_autocmd('FileType', { + pattern = 'dart', + callback = function() + vim.bo.tabstop = 2 + vim.bo.shiftwidth = 2 + vim.bo.softtabstop = 2 + vim.bo.expandtab = true + end, +}) +--dart run +vim.api.nvim_create_autocmd('FileType', { + pattern = 'dart', + callback = function() + vim.keymap.set('n', '', ':!dart run --enable-asserts %', { desc = 'Run Dart file' }) + end, +}) +--LSP Menu +vim.keymap.set('n', 'ca', function() + vim.lsp.buf.code_action { + apply = false, + } +end, { desc = 'Quick fix (Dart LSP)' }) diff --git a/lua/custom/plugins/hlchunk.lua b/lua/custom/plugins/hlchunk.lua index 7b12aede693..1e155130a8f 100644 --- a/lua/custom/plugins/hlchunk.lua +++ b/lua/custom/plugins/hlchunk.lua @@ -2,6 +2,21 @@ return { 'shellRaining/hlchunk.nvim', event = { 'BufReadPre', 'BufNewFile' }, config = function() - require('hlchunk').setup {} + require('hlchunk').setup { + indent = { + enable = true, + style = { { fg = '#3c6370' } }, + }, + chunk = { + enable = true, + style = { { fg = '#abb2bf' } }, + }, + line_num = { + enable = true, + }, + blank = { + enable = false, + }, + } end, }