Fixed filetype autocmds.
This commit is contained in:
parent
5be5497230
commit
4081aefe48
1 changed files with 12 additions and 8 deletions
|
@ -6,6 +6,7 @@ vim.call('plug#begin', '~/.config/nvim/plugged')
|
||||||
plug('https://gitlab.com/rawleyIfowler/melange')
|
plug('https://gitlab.com/rawleyIfowler/melange')
|
||||||
plug('ap/vim-css-color')
|
plug('ap/vim-css-color')
|
||||||
plug('ap/vim-buftabline')
|
plug('ap/vim-buftabline')
|
||||||
|
plug('dag/vim-fish')
|
||||||
plug('clojure-vim/clojure.vim', {['for'] = 'clojure'})
|
plug('clojure-vim/clojure.vim', {['for'] = 'clojure'})
|
||||||
plug('scrooloose/nerdtree', { on = 'NERDTreeToggle'})
|
plug('scrooloose/nerdtree', { on = 'NERDTreeToggle'})
|
||||||
plug('fatih/vim-go', { ['for'] = 'go' })
|
plug('fatih/vim-go', { ['for'] = 'go' })
|
||||||
|
@ -27,13 +28,13 @@ plug('hrsh7th/nvim-cmp')
|
||||||
plug('hrsh7th/cmp-buffer')
|
plug('hrsh7th/cmp-buffer')
|
||||||
plug('hrsh7th/cmp-nvim-lsp')
|
plug('hrsh7th/cmp-nvim-lsp')
|
||||||
plug('l3mon4d3/luasnip')
|
plug('l3mon4d3/luasnip')
|
||||||
|
plug('leafgarland/typescript-vim', {['for'] = 'typescript'})
|
||||||
vim.call('plug#end')
|
vim.call('plug#end')
|
||||||
pcall(require, 'nvim_utils')
|
pcall(require, 'nvim_utils')
|
||||||
local cmp = require('cmp')
|
local cmp = require('cmp')
|
||||||
-- Basic editor configurations
|
-- Basic editor configurations
|
||||||
set.tabstop = 4
|
set.tabstop = 4
|
||||||
set.shiftwidth = 4
|
set.shiftwidth = 4
|
||||||
set.softtabstop = 4
|
|
||||||
set.expandtab = true
|
set.expandtab = true
|
||||||
set.number = true
|
set.number = true
|
||||||
set.termguicolors = true
|
set.termguicolors = true
|
||||||
|
@ -88,16 +89,19 @@ vim.o.background = 'dark'
|
||||||
-- Clojure and Common Lisp style is 2 space indent
|
-- Clojure and Common Lisp style is 2 space indent
|
||||||
-- https://guide.clojure.style
|
-- https://guide.clojure.style
|
||||||
vim.cmd([[
|
vim.cmd([[
|
||||||
au FileType clojure,clj,lisp,cl,l call rainbow#load()
|
filetype on
|
||||||
let fts=['clojure', 'clj', 'lisp', 'lsp', 'cl', 'l']
|
filetype plugin on
|
||||||
if index(fts, &filetype) != -1
|
filetype plugin indent on
|
||||||
set ts=2
|
autocmd Filetype clojure,clj,lisp,lsp,cl,l let g:rainbow_active=1
|
||||||
set sw=2
|
|
||||||
:RainbowToggle
|
|
||||||
endif
|
|
||||||
]])
|
]])
|
||||||
require('lspconfig')['clojure_lsp'].setup{ capabilities = cmp_capabilities }
|
require('lspconfig')['clojure_lsp'].setup{ capabilities = cmp_capabilities }
|
||||||
-- Go specific configurations
|
-- Go specific configurations
|
||||||
require('lspconfig')['gopls'].setup{ capabilities = cmp_capabilities }
|
require('lspconfig')['gopls'].setup{ capabilities = cmp_capabilities }
|
||||||
-- C/C++ specific configurations
|
-- C/C++ specific configurations
|
||||||
require('lspconfig')['clangd'].setup{ capabilities = cmp_capabilities }
|
require('lspconfig')['clangd'].setup{ capabilities = cmp_capabilities }
|
||||||
|
-- TypeScript specific configurations
|
||||||
|
require('lspconfig')['tsserver'].setup{ capabilities = cmp_capabilities }
|
||||||
|
-- 2 Tab space standard languages
|
||||||
|
vim.cmd([[
|
||||||
|
autocmd Filetype clojure,clj,lisp,lsp,cl,l,javascript,js,typescript,ts setlocal tabstop=2 shiftwidth=2
|
||||||
|
]])
|
||||||
|
|
Loading…
Reference in a new issue