Merge 8f12b923f8 into 7201dc4801
				
					
				
			This commit is contained in:
		
						commit
						7725b911a9
					
				
							
								
								
									
										51
									
								
								init.lua
								
								
								
								
							
							
						
						
									
										51
									
								
								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'
 | 
			
		||||
| 
						 | 
				
			
			@ -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.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,6 +7,10 @@ return {
 | 
			
		|||
      local lint = require 'lint'
 | 
			
		||||
      lint.linters_by_ft = {
 | 
			
		||||
        markdown = { 'markdownlint' },
 | 
			
		||||
        javascript = { 'eslint_d' },
 | 
			
		||||
        typescript = { 'eslint_d' },
 | 
			
		||||
        javascriptreact = { 'eslint_d' },
 | 
			
		||||
        typescriptreact = { 'eslint_d' },
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      -- To allow other plugins to add linters to require('lint').linters_by_ft,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue