Added ocaml to treesitter
This commit is contained in:
parent
58f2dbab70
commit
db89686828
45
init.lua
45
init.lua
|
@ -86,7 +86,7 @@ require('lazy').setup({
|
|||
|
||||
-- Useful status updates for LSP
|
||||
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
||||
{ 'j-hui/fidget.nvim', tag = 'legacy', opts = {} },
|
||||
{ 'j-hui/fidget.nvim', tag = 'legacy', opts = {} },
|
||||
|
||||
-- Additional lua configuration, makes nvim stuff amazing!
|
||||
'folke/neodev.nvim',
|
||||
|
@ -110,7 +110,7 @@ require('lazy').setup({
|
|||
},
|
||||
|
||||
-- Useful plugin to show you pending keybinds.
|
||||
{ 'folke/which-key.nvim', opts = {} },
|
||||
{ 'folke/which-key.nvim', opts = {} },
|
||||
{
|
||||
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||
'lewis6991/gitsigns.nvim',
|
||||
|
@ -129,6 +129,7 @@ require('lazy').setup({
|
|||
-- don't override the built-in and fugitive keymaps
|
||||
local gs = package.loaded.gitsigns
|
||||
vim.keymap.set({ 'n', 'v' }, ']c', function()
|
||||
<<<<<<< Updated upstream
|
||||
if vim.wo.diff then
|
||||
return ']c'
|
||||
end
|
||||
|
@ -146,6 +147,17 @@ require('lazy').setup({
|
|||
end)
|
||||
return '<Ignore>'
|
||||
end, { expr = true, buffer = bufnr, desc = 'Jump to previous hunk' })
|
||||
=======
|
||||
if vim.wo.diff then return ']c' end
|
||||
vim.schedule(function() gs.next_hunk() end)
|
||||
return '<Ignore>'
|
||||
end, { expr = true, buffer = bufnr, desc = "Jump to next hunk" })
|
||||
vim.keymap.set({ 'n', 'v' }, '[c', function()
|
||||
if vim.wo.diff then return '[c' end
|
||||
vim.schedule(function() gs.prev_hunk() end)
|
||||
return '<Ignore>'
|
||||
end, { expr = true, buffer = bufnr, desc = "Jump to previous hunk" })
|
||||
>>>>>>> Stashed changes
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
@ -153,8 +165,13 @@ require('lazy').setup({
|
|||
{
|
||||
-- Theme inspired by Atom
|
||||
'navarasu/onedark.nvim',
|
||||
opts = {
|
||||
style = 'warmer',
|
||||
transparent = true,
|
||||
},
|
||||
priority = 1000,
|
||||
config = function()
|
||||
config = function(_, opts)
|
||||
require("onedark").setup(opts)
|
||||
vim.cmd.colorscheme 'onedark'
|
||||
end,
|
||||
},
|
||||
|
@ -165,7 +182,8 @@ require('lazy').setup({
|
|||
-- See `:help lualine.txt`
|
||||
opts = {
|
||||
options = {
|
||||
icons_enabled = false,
|
||||
transparent = false,
|
||||
icons_enabled = true,
|
||||
theme = 'onedark',
|
||||
component_separators = '|',
|
||||
section_separators = '',
|
||||
|
@ -217,9 +235,9 @@ require('lazy').setup({
|
|||
|
||||
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
|
||||
-- These are some example plugins that I've included in the kickstart repository.
|
||||
-- Uncomment any of the lines below to enable them.
|
||||
-- require 'kickstart.plugins.autoformat',
|
||||
-- require 'kickstart.plugins.debug',
|
||||
-- Uncomment any of the lines below to enable them.
|
||||
require 'kickstart.plugins.autoformat',
|
||||
require 'kickstart.plugins.debug',
|
||||
|
||||
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||
-- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping
|
||||
|
@ -240,6 +258,9 @@ vim.o.hlsearch = false
|
|||
-- Make line numbers default
|
||||
vim.wo.number = true
|
||||
|
||||
-- Show relative line numbers on either side of the cursor.
|
||||
vim.wo.relativenumber = true
|
||||
|
||||
-- Enable mouse mode
|
||||
vim.o.mouse = 'a'
|
||||
|
||||
|
@ -333,7 +354,12 @@ vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc =
|
|||
vim.defer_fn(function()
|
||||
require('nvim-treesitter.configs').setup {
|
||||
-- Add languages to be installed here that you want installed for treesitter
|
||||
<<<<<<< Updated upstream
|
||||
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash' },
|
||||
=======
|
||||
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim',
|
||||
'ocaml', },
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
||||
auto_install = false,
|
||||
|
@ -473,11 +499,12 @@ require('mason-lspconfig').setup()
|
|||
-- define the property 'filetypes' to the map in question.
|
||||
local servers = {
|
||||
-- clangd = {},
|
||||
-- gopls = {},
|
||||
gopls = {},
|
||||
-- pyright = {},
|
||||
-- rust_analyzer = {},
|
||||
-- tsserver = {},
|
||||
-- html = { filetypes = { 'html', 'twig', 'hbs'} },
|
||||
html = { filetypes = { 'html', 'twig', 'hbs' } },
|
||||
ocamllsp = {},
|
||||
|
||||
lua_ls = {
|
||||
Lua = {
|
||||
|
|
Loading…
Reference in New Issue