Skip to content

Commit

Permalink
Merge branch 'master' into codemedic-customisations
Browse files Browse the repository at this point in the history
* master:
  Remove two because there are more than two. (nvim-lua#1213)
  Set breakpoint icons and their highlight colors (nvim-lua#1194)
  Change diagnostic symbols if vim.g.have_nerd_font is true (nvim-lua#1195)
  samarth-nagar fix: lazy help tag on line 931 (nvim-lua#1167)
  Disable linting autocmd for readonly buffers (nvim-lua#1202)
  fix: update lazy uninstall information link (nvim-lua#1148)
  • Loading branch information
codemedic committed Oct 30, 2024
2 parents 6ebbb57 + 2ba39c6 commit 3de526d
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ examples of adding popularly requested plugins.
`~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim
distribution that you would like to try out.
* What if I want to "uninstall" this configuration:
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information
* See [lazy.nvim uninstall](https://lazy.folke.io/usage#-uninstalling) information
* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files?
* The main purpose of kickstart is to serve as a teaching tool and a reference
configuration that someone can easily use to `git clone` as a basis for their own.
Expand Down
19 changes: 17 additions & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = ' '

-- Set to true if you have a Nerd Font installed and selected in the terminal
vim.g.have_nerd_font = false
vim.g.have_nerd_font = (vim.fn.has 'gui_running' ~= 1)
vim.g.have_nerd_font = true

-- [[ Setting options ]]
-- See `:help vim.opt`
Expand Down Expand Up @@ -604,6 +604,15 @@ require('lazy').setup({
end,
})

-- Change diagnostic symbols in the sign column (gutter)
-- if vim.g.have_nerd_font then
-- local signs = { Error = '', Warn = '', Hint = '', Info = '' }
-- for type, icon in pairs(signs) do
-- local hl = 'DiagnosticSign' .. type
-- vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
-- end
-- end

-- LSP servers and clients are able to communicate to each other what features they support.
-- By default, Neovim doesn't support everything that is in the LSP specification.
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
Expand Down Expand Up @@ -961,7 +970,7 @@ require('lazy').setup({
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
},

-- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the
-- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the
-- init.lua. If you want these files, they are in the repository, so you can just download them and
-- place them in the correct locations.

Expand All @@ -981,6 +990,12 @@ 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 with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
-- Or use telescope!
-- In normal mode type `<space>sh` then write `lazy.nvim-plugin`
-- you can continue same window with `<space>sr` which resumes last telescope search
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
{ import = 'custom.plugins' },
}, {
Expand Down
12 changes: 12 additions & 0 deletions lua/kickstart/plugins/debug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@ return {
},
}

-- Change breakpoint icons
-- vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' })
-- vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' })
-- local breakpoint_icons = vim.g.have_nerd_font
-- and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' }
-- or { Breakpoint = '●', BreakpointCondition = '⊜', BreakpointRejected = '⊘', LogPoint = '◆', Stopped = '⭔' }
-- for type, icon in pairs(breakpoint_icons) do
-- local tp = 'Dap' .. type
-- local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak'
-- vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl })
-- end

dap.listeners.after.event_initialized['dapui_config'] = dapui.open
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
dap.listeners.before.event_exited['dapui_config'] = dapui.close
Expand Down
7 changes: 6 additions & 1 deletion lua/kickstart/plugins/lint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ return {
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
group = lint_augroup,
callback = function()
lint.try_lint()
-- Only run the linter in buffers that you can modify in order to
-- avoid superfluous noise, notably within the handy LSP pop-ups that
-- describe the hovered symbol using Markdown.
if vim.opt_local.modifiable:get() then
lint.try_lint()
end
end,
})
end,
Expand Down

0 comments on commit 3de526d

Please sign in to comment.