|
|
|
@ -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'
|
|
|
|
@ -681,29 +681,22 @@ require('lazy').setup({
|
|
|
|
|
},
|
|
|
|
|
opts = {
|
|
|
|
|
notify_on_error = false,
|
|
|
|
|
format_on_save = function(bufnr)
|
|
|
|
|
-- Disable "format_on_save lsp_fallback" for languages that don't
|
|
|
|
|
-- have a well standardized coding style. You can add additional
|
|
|
|
|
-- languages here or re-enable it for the disabled ones.
|
|
|
|
|
local disable_filetypes = { c = true, cpp = true }
|
|
|
|
|
local lsp_format_opt
|
|
|
|
|
if disable_filetypes[vim.bo[bufnr].filetype] then
|
|
|
|
|
lsp_format_opt = 'never'
|
|
|
|
|
else
|
|
|
|
|
lsp_format_opt = 'fallback'
|
|
|
|
|
end
|
|
|
|
|
return {
|
|
|
|
|
timeout_ms = 500,
|
|
|
|
|
lsp_format = lsp_format_opt,
|
|
|
|
|
}
|
|
|
|
|
end,
|
|
|
|
|
format_on_save = false,
|
|
|
|
|
formatters_by_ft = {
|
|
|
|
|
lua = { 'stylua' },
|
|
|
|
|
-- Conform can also run multiple formatters sequentially
|
|
|
|
|
-- 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 },
|
|
|
|
|
javascript = { 'prettierd' },
|
|
|
|
|
typescript = { 'prettierd' },
|
|
|
|
|
javascriptreact = { 'prettierd' },
|
|
|
|
|
typescriptreact = { 'prettierd' },
|
|
|
|
|
css = { 'prettierd' },
|
|
|
|
|
scss = { 'prettierd' },
|
|
|
|
|
html = { 'prettierd' },
|
|
|
|
|
json = { 'prettierd' },
|
|
|
|
|
markdown = { 'prettierd' },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
@ -728,12 +721,12 @@ require('lazy').setup({
|
|
|
|
|
-- `friendly-snippets` contains a variety of premade snippets.
|
|
|
|
|
-- See the README about individual language/framework/plugin snippets:
|
|
|
|
|
-- https://github.com/rafamadriz/friendly-snippets
|
|
|
|
|
-- {
|
|
|
|
|
-- 'rafamadriz/friendly-snippets',
|
|
|
|
|
-- config = function()
|
|
|
|
|
-- require('luasnip.loaders.from_vscode').lazy_load()
|
|
|
|
|
-- end,
|
|
|
|
|
-- },
|
|
|
|
|
{
|
|
|
|
|
'rafamadriz/friendly-snippets',
|
|
|
|
|
config = function()
|
|
|
|
|
require('luasnip.loaders.from_vscode').lazy_load()
|
|
|
|
|
end,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
'saadparwaiz1/cmp_luasnip',
|
|
|
|
@ -918,11 +911,11 @@ require('lazy').setup({
|
|
|
|
|
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
|
|
|
|
--
|
|
|
|
|
-- 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.gitsigns', -- adds gitsigns recommend keymaps
|
|
|
|
|
require 'kickstart.plugins.indent_line',
|
|
|
|
|
require 'kickstart.plugins.lint',
|
|
|
|
|
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.
|
|
|
|
@ -953,4 +946,4 @@ require('lazy').setup({
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
|
|
|
|
-- vim: ts=2 sts=2 sw=2 et
|
|
|
|
|
-- vim: ts=2 sts=2 sw=2 et
|