Skip to main content
added 3601 characters in body
Source Link

I also noticed that all formatting (including indentation) is reset when an error occurs when loading the lazy package manager;manager, the code in this case looks the same as in the photo from GitHub.

Neovim: neovim indent styleNeovim:

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable", -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
  -- AUTOPAIRS
  {
    'windwp/nvim-autopairs',
    event = "InsertEnter",
    opts = {}
  },
  -- TELESCOPE
  {
    'nvim-telescope/telescope.nvim', tag = '0.1.5',
    dependencies = { 'nvim-lua/plenary.nvim' },

    config = function()
      local actions = require("telescope.actions")
      require("telescope").setup{
        defaults = {
          mappings = {
            i = {
              ["<C-k>"] = actions.move_selection_previous, -- move to prev result
              ["<C-j>"] = actions.move_selection_next, -- move to next result
            },
          },
        },
      }
      local builtin = require('telescope.builtin')
      vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
      vim.keymap.set('n', '<leader>gf', builtin.git_files, {})

    end
  },
  -- TREE-SITTER
  {
    "nvim-treesitter/nvim-treesitter",
    build = ":TSUpdate",
    config = function () 
      local configs = require("nvim-treesitter.configs")

      configs.setup({
        ensure_installed = { "html", "css", "javascript", "typescript", "lua", "vim" },
        sync_install = false,
        highlight = { enable = true },
        indent = { enable = true },  
      })
    end
  },
  -- COLORSCHEME
  {
    "folke/tokyonight.nvim",
    lazy = false,
    priority = 1000,
    opts = {},
    config = function()
      require("tokyonight").setup({
        transparent = true
      })
      vim.cmd[[colorscheme tokyonight-moon]]
    end
  }
})

GitHub: github indent styleGitHub:

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
    vim.fn.system({
        "git",
        "clone",
        "--filter=blob:none",
        "https://github.com/folke/lazy.nvim.git",
        "--branch=stable", -- latest stable release
        lazypath,
    })
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
    -- AUTOPAIRS
    {
        'windwp/nvim-autopairs',
    event = "InsertEnter",
        opts = {}
    },
    -- TELESCOPE
    {
        'nvim-telescope/telescope.nvim', tag = '0.1.5',
        dependencies = { 'nvim-lua/plenary.nvim' },

        config = function()
            local actions = require("telescope.actions")
            require("telescope").setup{
                defaults = {
                    mappings = {
                        i = {
                            ["<C-k>"] = actions.move_selection_previous, -- move to prev result
                            ["<C-j>"] = actions.move_selection_next, -- move to next result
                        },
                    },
                },
            }
            local builtin = require('telescope.builtin')
            vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
            vim.keymap.set('n', '<leader>gf', builtin.git_files, {})

        end
    },
    -- TREE-SITTER
    {
        "nvim-treesitter/nvim-treesitter",
        build = ":TSUpdate",
        config = function () 
            local configs = require("nvim-treesitter.configs")

            configs.setup({
                ensure_installed = { "html", "css", "javascript", "typescript", "lua", "vim" },
                sync_install = false,
                highlight = { enable = true },
                indent = { enable = true },  
            })
        end
    },
    -- COLORSCHEME
    {
        "folke/tokyonight.nvim",
    lazy = false,
    priority = 1000,
        opts = {},
        config = function()
            require("tokyonight").setup({
                transparent = true
            })
            vim.cmd[[colorscheme tokyonight-moon]]
        end
    }
})

options.lua some relevant optionsoptions.lua:

vim.g.mapleader = " "

vim.wo.number = true
vim.o.mouse = 'a'
vim.o.termguicolors = true

vim.o.expandtab = false        
vim.o.shiftwidth = 2         
vim.o.tabstop = 2             
vim.o.smartindent = true

I also noticed that all formatting (including indentation) is reset when an error occurs when loading the lazy package manager; the code in this case looks the same as in the photo from GitHub.

Neovim: neovim indent style

GitHub: github indent style

options.lua some relevant options

I also noticed that all formatting (including indentation) is reset when an error occurs when loading the lazy package manager, the code in this case looks the same as in GitHub

Neovim:

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable", -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
  -- AUTOPAIRS
  {
    'windwp/nvim-autopairs',
    event = "InsertEnter",
    opts = {}
  },
  -- TELESCOPE
  {
    'nvim-telescope/telescope.nvim', tag = '0.1.5',
    dependencies = { 'nvim-lua/plenary.nvim' },

    config = function()
      local actions = require("telescope.actions")
      require("telescope").setup{
        defaults = {
          mappings = {
            i = {
              ["<C-k>"] = actions.move_selection_previous, -- move to prev result
              ["<C-j>"] = actions.move_selection_next, -- move to next result
            },
          },
        },
      }
      local builtin = require('telescope.builtin')
      vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
      vim.keymap.set('n', '<leader>gf', builtin.git_files, {})

    end
  },
  -- TREE-SITTER
  {
    "nvim-treesitter/nvim-treesitter",
    build = ":TSUpdate",
    config = function () 
      local configs = require("nvim-treesitter.configs")

      configs.setup({
        ensure_installed = { "html", "css", "javascript", "typescript", "lua", "vim" },
        sync_install = false,
        highlight = { enable = true },
        indent = { enable = true },  
      })
    end
  },
  -- COLORSCHEME
  {
    "folke/tokyonight.nvim",
    lazy = false,
    priority = 1000,
    opts = {},
    config = function()
      require("tokyonight").setup({
        transparent = true
      })
      vim.cmd[[colorscheme tokyonight-moon]]
    end
  }
})

GitHub:

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
    vim.fn.system({
        "git",
        "clone",
        "--filter=blob:none",
        "https://github.com/folke/lazy.nvim.git",
        "--branch=stable", -- latest stable release
        lazypath,
    })
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
    -- AUTOPAIRS
    {
        'windwp/nvim-autopairs',
    event = "InsertEnter",
        opts = {}
    },
    -- TELESCOPE
    {
        'nvim-telescope/telescope.nvim', tag = '0.1.5',
        dependencies = { 'nvim-lua/plenary.nvim' },

        config = function()
            local actions = require("telescope.actions")
            require("telescope").setup{
                defaults = {
                    mappings = {
                        i = {
                            ["<C-k>"] = actions.move_selection_previous, -- move to prev result
                            ["<C-j>"] = actions.move_selection_next, -- move to next result
                        },
                    },
                },
            }
            local builtin = require('telescope.builtin')
            vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
            vim.keymap.set('n', '<leader>gf', builtin.git_files, {})

        end
    },
    -- TREE-SITTER
    {
        "nvim-treesitter/nvim-treesitter",
        build = ":TSUpdate",
        config = function () 
            local configs = require("nvim-treesitter.configs")

            configs.setup({
                ensure_installed = { "html", "css", "javascript", "typescript", "lua", "vim" },
                sync_install = false,
                highlight = { enable = true },
                indent = { enable = true },  
            })
        end
    },
    -- COLORSCHEME
    {
        "folke/tokyonight.nvim",
    lazy = false,
    priority = 1000,
        opts = {},
        config = function()
            require("tokyonight").setup({
                transparent = true
            })
            vim.cmd[[colorscheme tokyonight-moon]]
        end
    }
})

options.lua:

vim.g.mapleader = " "

vim.wo.number = true
vim.o.mouse = 'a'
vim.o.termguicolors = true

vim.o.expandtab = false        
vim.o.shiftwidth = 2         
vim.o.tabstop = 2             
vim.o.smartindent = true
Became Hot Network Question
deleted 114 characters in body
Source Link
D. Ben Knoble
  • 27.7k
  • 3
  • 31
  • 68

I am regualr VsCode user, started using Neovim two days ago. I'm currently making my own configurations and after commitAfter committing I realised that tab indentindents on github is differentGitHub show differently from mywhat I see in Neovim code.

I also noticed that all formatting (including indentation) is reset when an error occurs when loading the lazy package manager,manager; the code in this case looks the same as in the photo from GithubGitHub.

I want to my code doeditor not to lie me so it'sit looks exactly the same in all editors and github.

What am I missing? :)

neovimNeovim: neovimneovim indent style

githubGitHub: enter image description heregithub indent style

options.lua enter image description heresome relevant options

I am regualr VsCode user, started using Neovim two days ago. I'm currently making my own configurations and after commit I realised that tab indent on github is different from my Neovim code.

I also noticed that all formatting (including indentation) is reset when an error occurs when loading the lazy package manager, the code in this case looks the same as in the photo from Github.

I want to my code do not lie me so it's looks exactly the same in all editors and github.

What am I missing? :)

neovim: neovim

github: enter image description here

options.lua enter image description here

After committing I realised that indents on GitHub show differently from what I see in Neovim.

I also noticed that all formatting (including indentation) is reset when an error occurs when loading the lazy package manager; the code in this case looks the same as in the photo from GitHub.

I want my editor not to lie me so it looks exactly the same in all editors.

What am I missing? :)

Neovim: neovim indent style

GitHub: github indent style

options.lua some relevant options

added 2 characters in body
Source Link
Vivian De Smedt
  • 21.2k
  • 5
  • 22
  • 40

I am regualr vscodeVsCode user, started using neovim 2Neovim two days ago. I'm currently making my own configurations and after commit I realised that tab indent on github is different from my Neovim code.

I also noticed that all formatting (including indentation) is reset when an error occurs when loading the lazy package manager, the code in this case looks the same as in the photo from Github.

I want to my code do not lie me so it's looks exactly the same in all editors and github.

What am I missing? :)

neovim: neovim

github: enter image description here

options.lua enter image description here

I am regualr vscode user, started using neovim 2 days ago. I'm currently making my own configurations and after commit I realised that tab indent on github is different from my Neovim code.

I also noticed that all formatting (including indentation) is reset when an error occurs when loading the lazy package manager, the code in this case looks the same as in the photo from Github.

I want to my code do not lie me so it's looks exactly the same in all editors and github.

What am I missing? :)

neovim: neovim

github: enter image description here

options.lua enter image description here

I am regualr VsCode user, started using Neovim two days ago. I'm currently making my own configurations and after commit I realised that tab indent on github is different from my Neovim code.

I also noticed that all formatting (including indentation) is reset when an error occurs when loading the lazy package manager, the code in this case looks the same as in the photo from Github.

I want to my code do not lie me so it's looks exactly the same in all editors and github.

What am I missing? :)

neovim: neovim

github: enter image description here

options.lua enter image description here

deleted 5 characters in body; edited title
Source Link
Vivian De Smedt
  • 21.2k
  • 5
  • 22
  • 40
Loading
Source Link
Loading