Install emment in Emacs editor

நண்பரே நான் emacs editor யில் emment Install செய்வது எப்படி?

emment என்றால் என்ன?

html file எழுத உதவியாக இருக்கும் நண்பரே

Microsoft :frowning: vscode editor யில் builtin னாக வரும்

emmet official site

இந்த நிகழ்படத்தில் emmet-mode பற்றி பேசியுள்ளார். உதவுகிறதா என்று பார்க்கவும்.

மன்னிக்கவும்
எனக்கு நன்றாக புரியவில்லை

emas Config File யில் என்ன சேர்க்க வேண்டும்?

அவர் web - mode, emmet mode என கூறுகிறார்.

லினக்சில் மென்பருட்களை நிறுவ எப்படி டிஸ்ட்ரிபியூஷன் ரெப்பாசட்டரிகள் உள்ளனவோ அதேபோல் இமேக்சிலும் அதன் பேக்கேஜ்களை நிறுவ elpa, melpa, nongnu என்று பல ரெப்பாசட்டரிகள் உள்ளன. இவை மட்டுமி்ல்லாமல் straight.el வழியாக ஒரு கிட் ரெப்பாசட்டரியில் இருந்து நேரடியாகவும் இமேக்சில் பேக்கேஜ்களை நிறுவ இயலும். elpa என்பது இமேக்சில் Built-in ஆக உள்ள பேக்கேஜ் ரெப்பாசட்டரி, அதில் உள்ள பேக்கேஜ்களை நிறுவ இமேக்சில் இருந்து M-x list-packages என்ற கமாண்டை இயக்கி அதன் வழியாக நிறுவலாம்.

பேக்கேஜ்களை நிறுவுவதோடு மட்டுமல்லாமல் அதை நமக்கு ஏற்றதுபோல் கன்பிகர் செய்ய வேண்டும். பொதுவாக இமேக்ஸ் பயன்படுத்துபவர்கள் ஒரு கன்பிகர் கோப்பை வைத்து பேக்கேஜ்களை பராமரிப்பர். அதை பற்றி இந்த நிகழ்படத்தில் @GoldAyan தெளிவாக விவரித்து இருப்பார்

நிகழ்படத்தில் கூறி உள்ளபடி நீங்களும் ஒரு கன்பிகர் கோப்பை பயன்படுத்துகின்றீர்கள் என்றால் emmet-mode ஐ அந்த கன்பிகர் கோப்பில் சேர்க்க வேண்டும். அதைத்தான் முதலில் பகிரப்பட்டுள்ள நிகழ்படத்தில் கூறியிருப்பார்.

1 Like

நன்றி நண்பரே :slight_smile:
நான் emmet நிறுவுகிறேன்.
எவையும் சிக்கல் ஏற்பட்டால் மீண்டும் கூறுகிறேன்.

Alternative is to use lsp tools:

There are two language server for emmet which can be used in both neovim/vim and emacs

To use it with emacs we need to configure eglot.

olrtg emacs la eppiti install panunum bro official documentation enaku puriyala

Ensure you have latest emacs installed

  • Install the Emmet language server in your local machine globally using following command (This is taken from the olrtg - github readme file)
npm i -g @olrtg/emmet-language-server
  • Then we can connect to the language server using eglot using the following code
(with-eval-after-load 'eglot
  (add-to-list 'eglot-server-programs
               '(html-mode . ("emmet-language-server" "--stdio"))))

Once the above code is executed open any html file and type emmet command and type Alt+x Completion at point. This will expand the html.

But one problem i faced in above, is that cursor is not placed in correct position after the snippet insertion we have to manually move the cursor and edit the necessary things.