Skip to content

Commit 6220a43

Browse files
committed
update neovim config
1 parent 37bc753 commit 6220a43

File tree

1 file changed

+99
-46
lines changed

1 file changed

+99
-46
lines changed

init.lua

Lines changed: 99 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,102 @@ require('lazy').setup({
133133
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 },
134134
{ 'folke/tokyonight.nvim', priority = 1000, },
135135

136+
{
137+
"echasnovski/mini.align",
138+
keys = { "ga", "gA" },
139+
opts = {
140+
mappings = {
141+
start = "ga",
142+
start_with_preview = "gA",
143+
},
144+
},
145+
},
146+
147+
-- {
148+
-- "echasnovski/mini.icons",
149+
-- opts = {},
150+
-- lazy = true,
151+
-- specs = {
152+
-- { "nvim-tree/nvim-web-devicons", enabled = false, optional = true },
153+
-- },
154+
-- init = function()
155+
-- package.preload["nvim-web-devicons"] = function()
156+
-- require("mini.icons").mock_nvim_web_devicons()
157+
-- return package.loaded["nvim-web-devicons"]
158+
-- end
159+
-- end,
160+
-- },
161+
162+
-- {
163+
-- 'nvim-lualine/lualine.nvim',
164+
-- config = function()
165+
-- local lualine = require 'lualine'
166+
-- local icon = require 'nvim-web-devicons'
167+
-- local icon = require 'hieulw.icons'
168+
-- local mode = "mode"
169+
-- local filetype = { "filetype", icon_only = true }
170+
171+
-- local diagnostics = {
172+
-- "diagnostics",
173+
-- sources = { "nvim_diagnostic" },
174+
-- sections = { "error", "warn", "info", "hint" },
175+
-- symbols = {
176+
-- error = icon.diagnostics.Error,
177+
-- hint = icon.diagnostics.Hint,
178+
-- info = icon.diagnostics.Info,
179+
-- warn = icon.diagnostics.Warning,
180+
-- },
181+
-- colored = true,
182+
-- update_in_insert = false,
183+
-- always_visible = false,
184+
-- }
185+
186+
-- local diff = {
187+
-- "diff",
188+
-- source = function()
189+
-- local gitsigns = vim.b.gitsigns_status_dict
190+
-- if gitsigns then
191+
-- return {
192+
-- added = gitsigns.added,
193+
-- modified = gitsigns.changed,
194+
-- removed = gitsigns.removed,
195+
-- }
196+
-- end
197+
-- end,
198+
-- symbols = {
199+
-- added = icon.git.LineAdded .. " ",
200+
-- modified = icon.git.LineModified .. " ",
201+
-- removed = icon.git.LineRemoved .. " ",
202+
-- },
203+
-- colored = true,
204+
-- always_visible = false,
205+
-- }
206+
207+
-- lualine.setup {
208+
-- options = {
209+
-- theme = "auto",
210+
-- globalstatus = true,
211+
-- section_separators = "",
212+
-- component_separators = "",
213+
-- disabled_filetypes = { statusline = { "dashboard", "lazy", "alpha" } },
214+
-- },
215+
-- sections = {
216+
-- lualine_a = { mode },
217+
-- lualine_b = {},
218+
-- lualine_c = { "filename" },
219+
-- lualine_x = { diff, diagnostics, filetype },
220+
-- lualine_y = {},
221+
-- lualine_z = {},
222+
-- },
223+
-- }
224+
-- end,
225+
-- },
226+
136227
{
137228
'MeanderingProgrammer/render-markdown.nvim',
138229
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite
139230
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins
140231
dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
141-
-- ---@module 'render-markdown'
142-
-- ---@type render.md.UserConfig
143232
opts = {},
144233
},
145234

@@ -250,31 +339,7 @@ require('lazy').setup({
250339
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
251340
},
252341
config = function()
253-
-- Telescope is a fuzzy finder that comes with a lot of different things that
254-
-- it can fuzzy find! It's more than just a "file finder", it can search
255-
-- many different aspects of Neovim, your workspace, LSP, and more!
256-
--
257-
-- The easiest way to use Telescope, is to start by doing something like:
258-
-- :Telescope help_tags
259-
--
260-
-- After running this command, a window will open up and you're able to
261-
-- type in the prompt window. You'll see a list of `help_tags` options and
262-
-- a corresponding preview of the help.
263-
--
264-
-- Two important keymaps to use while in Telescope are:
265-
-- - Insert mode: <c-/>
266-
-- - Normal mode: ?
267-
268-
-- This opens a window that shows you all of the keymaps for the current
269-
-- Telescope picker. This is really useful to discover what Telescope can
270-
-- do as well as how to actually do it!
271-
272-
-- [[ Configure Telescope ]]
273-
-- See `:help telescope` and `:help telescope.setup()`
274342
require('telescope').setup {
275-
-- You can put your default mappings / updates / etc. in here
276-
-- All the info you're looking for is in `:help telescope.setup()`
277-
--
278343
-- defaults = {
279344
-- mappings = {
280345
-- i = { ['<c-enter>'] = 'to_fuzzy_refine' },
@@ -455,10 +520,6 @@ require('lazy').setup({
455520
end,
456521
})
457522

458-
-- LSP servers and clients are able to communicate to each other what features they support.
459-
-- By default, Neovim doesn't support everything that is in the LSP specification.
460-
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
461-
-- So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
462523
local capabilities = vim.lsp.protocol.make_client_capabilities()
463524
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
464525

@@ -475,6 +536,13 @@ require('lazy').setup({
475536
clangd = {},
476537
-- gopls = {},
477538
pyright = {},
539+
bashls = {},
540+
cmake = {},
541+
dockerls = {},
542+
gitlab_ci_ls = {},
543+
jsonls = {},
544+
markdown_oxide = {},
545+
yamlls = {},
478546
-- rust_analyzer = {},
479547
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
480548
--
@@ -590,14 +658,9 @@ require('lazy').setup({
590658
-- Scroll the documentation window [b]ack / [f]orward
591659
['<C-b>'] = cmp.mapping.scroll_docs(-4),
592660
['<C-f>'] = cmp.mapping.scroll_docs(4),
593-
594661
['<CR>'] = cmp.mapping.confirm { select = true },
595662
['<Tab>'] = cmp.mapping.select_next_item(),
596663
['<S-Tab>'] = cmp.mapping.select_prev_item(),
597-
598-
-- Manually trigger a completion from nvim-cmp.
599-
-- Generally you don't need this, because nvim-cmp will display
600-
-- completions whenever it has completion options available.
601664
['<C-Space>'] = cmp.mapping.complete {},
602665

603666
-- Think of <c-l> as moving to the right of your snippet expansion.
@@ -625,7 +688,6 @@ require('lazy').setup({
625688
sources = {
626689
{
627690
name = 'lazydev',
628-
-- set group index to 0 to skip loading LuaLS completions as lazydev recommends it
629691
group_index = 0,
630692
},
631693
{ name = 'nvim_lsp' },
@@ -657,25 +719,16 @@ require('lazy').setup({
657719
-- - sr)' - [S]urround [R]eplace [)] [']
658720
require('mini.surround').setup()
659721

660-
-- Simple and easy statusline.
661-
-- You could remove this setup call if you don't like it,
662-
-- and try some other statusline plugin
663722
local statusline = require 'mini.statusline'
664-
-- set use_icons to true if you have a Nerd Font
665723
statusline.setup { use_icons = vim.g.have_nerd_font }
666724

667-
-- You can configure sections in the statusline by overriding their
668-
-- default behavior. For example, here we set the section for
669-
-- cursor location to LINE:COLUMN
670725
---@diagnostic disable-next-line: duplicate-set-field
671726
statusline.section_location = function()
672727
return '%2l:%-2v'
673728
end
674-
675-
-- ... and there is more!
676-
-- Check out: https://github.com/echasnovski/mini.nvim
677729
end,
678730
},
731+
679732
{ -- Highlight, edit, and navigate code
680733
'nvim-treesitter/nvim-treesitter',
681734
build = ':TSUpdate',

0 commit comments

Comments
 (0)