From 7a44cf22f8bef92e4d94e3abba359a6d3824ec34 Mon Sep 17 00:00:00 2001 From: kyungsong Date: Fri, 10 May 2024 13:40:07 +0900 Subject: [PATCH 1/4] init changed. colors added --- init.lua | 34 ++++---------------- lua/colors/colorscheme.lua | 4 +++ lua/custom/plugins/{init.lua => plugins.lua} | 7 +++- 3 files changed, 17 insertions(+), 28 deletions(-) create mode 100644 lua/colors/colorscheme.lua rename lua/custom/plugins/{init.lua => plugins.lua} (63%) diff --git a/init.lua b/init.lua index 776c6873ff6..760effba0e3 100644 --- a/init.lua +++ b/init.lua @@ -102,7 +102,7 @@ vim.g.have_nerd_font = false vim.opt.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.opt.relativenumber = true +vim.opt.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' @@ -665,7 +665,7 @@ require('lazy').setup({ local servers = { -- clangd = {}, -- gopls = {}, - -- pyright = {}, + pyright = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- @@ -708,6 +708,7 @@ require('lazy').setup({ local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { 'stylua', -- Used to format Lua code + 'pyright', }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } @@ -761,7 +762,7 @@ require('lazy').setup({ formatters_by_ft = { lua = { 'stylua' }, -- Conform can also run multiple formatters sequentially - -- python = { "isort", "black" }, + python = { 'isort', 'black' }, -- -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true }, @@ -867,29 +868,6 @@ require('lazy').setup({ signature = { enabled = true }, }, }, - - { -- You can easily change to a different colorscheme. - -- Change the name of the colorscheme plugin below, and then - -- change the command in the config to whatever the name of that colorscheme is. - -- - -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. - 'folke/tokyonight.nvim', - priority = 1000, -- Make sure to load this before all the other start plugins. - config = function() - ---@diagnostic disable-next-line: missing-fields - require('tokyonight').setup { - styles = { - comments = { italic = false }, -- Disable italics in comments - }, - } - - -- Load the colorscheme here. - -- Like many other themes, this one has different styles, and you could load - -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'tokyonight-night' - end, - }, - -- Highlight todo, notes, etc in comments { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, @@ -976,7 +954,8 @@ require('lazy').setup({ -- 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' }, + -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` + { import = 'custom.plugins' }, -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- Or use telescope! @@ -1004,5 +983,6 @@ require('lazy').setup({ }, }) +require 'colors.colorscheme' -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et diff --git a/lua/colors/colorscheme.lua b/lua/colors/colorscheme.lua new file mode 100644 index 00000000000..2a67d684567 --- /dev/null +++ b/lua/colors/colorscheme.lua @@ -0,0 +1,4 @@ +local colorscheme = 'gruvbox' +vim.o.background = 'dark' +vim.cmd.colorscheme(colorscheme) +vim.cmd.hi 'Comment gui=none' diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/plugins.lua similarity index 63% rename from lua/custom/plugins/init.lua rename to lua/custom/plugins/plugins.lua index be0eb9d8d7a..d98248dbb4f 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/plugins.lua @@ -2,4 +2,9 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information -return {} +return { + 'morhetz/gruvbox', + 'tanvirtin/monokai.nvim', + 'folke/tokyonight.nvim', + 'EdenEast/nightfox.nvim', +} From 03f77fc61602890cafd5699d93701d9a7515a8d2 Mon Sep 17 00:00:00 2001 From: kyungsong Date: Fri, 4 Oct 2024 22:57:01 +0900 Subject: [PATCH 2/4] added file explorer, auto open when reading a file --- init.lua | 8 ++++++++ lua/custom/plugins/plugins.lua | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/init.lua b/init.lua index 760effba0e3..2a5c68b0b6b 100644 --- a/init.lua +++ b/init.lua @@ -247,6 +247,14 @@ require('lazy').setup({ -- -- Use `opts = {}` to automatically pass options to a plugin's `setup()` function, forcing the plugin to be loaded. -- + -- This is equivalent to: + -- require('Comment').setup({}) + + -- "gc" to comment visual regions/lines + { 'numToStr/Comment.nvim', opts = {} }, + { 'vidocqh/data-viewer.nvim', opts = {}, dependencies = { + 'nvim-lua/plenary.nvim', + } }, -- Alternatively, use `config = function() ... end` for full control over the configuration. -- If you prefer to call `setup` explicitly, use: diff --git a/lua/custom/plugins/plugins.lua b/lua/custom/plugins/plugins.lua index d98248dbb4f..44a89fa6439 100644 --- a/lua/custom/plugins/plugins.lua +++ b/lua/custom/plugins/plugins.lua @@ -7,4 +7,23 @@ return { 'tanvirtin/monokai.nvim', 'folke/tokyonight.nvim', 'EdenEast/nightfox.nvim', + { + 'nvim-tree/nvim-tree.lua', + config = function() + vim.g.loaded_netrw = 1 + vim.g.loaded_netrwPlugin = 1 + vim.api.nvim_create_autocmd('BufReadPost', { + callback = function(data) + local api = require 'nvim-tree.api' + api.tree.open() + end, + }) + require('nvim-tree').setup { + sort = { sorter = 'case_sensitive' }, + view = { width = 30 }, + renderer = { group_empty = true }, + filters = { dotfiles = true }, + } + end, + }, } From 218683541f320935004e14ace5cda63c60c05521 Mon Sep 17 00:00:00 2001 From: Kyung Song Date: Thu, 1 May 2025 11:01:30 +0900 Subject: [PATCH 3/4] upstream changes --- init.lua | 3 ++- lua/custom/plugins/plugins.lua | 10 ++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/init.lua b/init.lua index 2a5c68b0b6b..f7fb21d2b92 100644 --- a/init.lua +++ b/init.lua @@ -350,12 +350,13 @@ require('lazy').setup({ }, }, }, - -- NOTE: Plugins can specify dependencies. -- -- The dependencies are proper plugin specifications as well - anything -- you do for a plugin at the top level, you can do for a dependency. -- + -- + -- -- Use the `dependencies` key to specify the dependencies of a particular plugin { -- Fuzzy Finder (files, lsp, etc) diff --git a/lua/custom/plugins/plugins.lua b/lua/custom/plugins/plugins.lua index 44a89fa6439..09108d5ddbc 100644 --- a/lua/custom/plugins/plugins.lua +++ b/lua/custom/plugins/plugins.lua @@ -10,14 +10,12 @@ return { { 'nvim-tree/nvim-tree.lua', config = function() + local api = require 'nvim-tree.api' vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 - vim.api.nvim_create_autocmd('BufReadPost', { - callback = function(data) - local api = require 'nvim-tree.api' - api.tree.open() - end, - }) + vim.keymap.set('n', 'st', function() + api.tree.toggle() + end, { desc = '[S]earch file tree [T]oggle' }) require('nvim-tree').setup { sort = { sorter = 'case_sensitive' }, view = { width = 30 }, From 7b9d7fc1fbd8334fadcfae249ab2bb045633470d Mon Sep 17 00:00:00 2001 From: kyungsong Date: Sun, 12 Jul 2026 10:26:17 +0000 Subject: [PATCH 4/4] tree-sitter changes --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index f7fb21d2b92..321f63f6a1e 100644 --- a/init.lua +++ b/init.lua @@ -920,7 +920,7 @@ require('lazy').setup({ { -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate', - main = 'nvim-treesitter.configs', -- Sets main module to use for opts + main = 'nvim-treesitter.config', -- Sets main module to use for opts -- [[ Configure Treesitter ]] See `:help nvim-treesitter` opts = { ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },