Skip to content

Commit ae1190e

Browse files
Wolfe David (XC-CT/PRM-NA)Wolfe David (XC-CT/PRM-NA)
Wolfe David (XC-CT/PRM-NA)
authored and
Wolfe David (XC-CT/PRM-NA)
committed
Add none-ls
1 parent be6e5bd commit ae1190e

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ require('lazy').setup({
274274
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
275275
--
276276
-- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins
277-
-- { import = 'custom.plugins' },
277+
{ import = 'custom.plugins' },
278278
}, {})
279279

280280
-- [[ Setting options ]]
@@ -437,7 +437,7 @@ vim.defer_fn(function()
437437
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash' },
438438

439439
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
440-
auto_install = false,
440+
auto_install = true,
441441

442442
highlight = { enable = true },
443443
indent = { enable = true },

lua/custom/plugins/none-ls.lua

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
return {
2+
'nvimtools/none-ls.nvim',
3+
config = function()
4+
local null_ls = require 'null-ls'
5+
null_ls.setup {
6+
sources = {
7+
null_ls.builtins.formatting.black,
8+
null_ls.builtins.formatting.isort,
9+
null_ls.builtins.formatting.shfmt,
10+
null_ls.builtins.formatting.stylua,
11+
},
12+
}
13+
vim.keymap.set('n', '<leader>ff', vim.lsp.buf.format, { desc = 'Format current buffer' })
14+
end,
15+
}

0 commit comments

Comments
 (0)